/* Reset and Base Styles  CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #F9F9F6;
}

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

/* Header Styles */
.header {
    background-color: #fff;
    height: 85px;
    border-bottom: 1px solid #eaeaea;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1001;
    /* Ensure smooth transition for hiding/showing */
    transition: transform 0.3s ease-in-out;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

/* Logo positioned at left without border radius */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo img {
    height: 70px;
    width: auto; /* Maintain aspect ratio */
    object-fit: cover;
    cursor: pointer;
    border-radius: 0;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
    white-space: nowrap;
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Desktop Navigation */
.main-nav {
    display: flex;
    flex: 1;
    justify-content: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 6px;
}

.main-nav a:hover {
    color: #ffd700;
    background-color: #f8f9fa;
}

/* Active link styling for desktop */
.main-nav a.active {
    color: #ffd700;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffd700;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.cart-icon {
    position: relative;
}

.cart-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #fff;
    border: 2px solid #eaeaea;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
}

.cart-link:hover {
    background-color: #f8f9fa;
    border-color: #ffd700;
    color: #000;
}

.cart-link i {
    font-size: 1.2rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid white;
}

.cart-count.pulse {
    animation: pulse 0.5s ease-in-out;
    transform: scale(1.2);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* User Section Styles */
.user-section {
    display: flex;
    align-items: center;
}

.user-welcome {
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.user-welcome:hover {
    background-color: #f5f5f5;
}

.welcome-text {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.welcome-text::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s;
}

.user-welcome.active .welcome-text::after {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-welcome.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font: inherit;
    cursor: pointer;
    padding: 12px 16px;
    color: #333;
}

.logout-btn:hover {
    background-color: #f8f9fa;
}

/* Auth Links for non-logged in users */
.auth-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.login-btn, .register-btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.login-btn {
    color: #333;
    border: 1px solid #eaeaea;
}

.login-btn:hover {
    background-color: #f5f5f5;
}

.register-btn {
    background-color: #ffd700;
    color: #000;
    border: 1px solid #ffd700;
}

.register-btn:hover {
    background-color: #ffc107;
    border-color: #ffc107;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 150px);
    background-color: #F9F9F6;
}

/* Footer */
.footer {
    background-color: #fff;
    border-top: 1px solid #eaeaea;
    padding: 30px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ffd700;
}

.footer p {
    color: #666;
    font-size: 0.875rem;
}

/* Footer icons */
.footer-links a i {
    margin-right: 8px;
}

/* User section icons */
.user-dropdown .dropdown-item i,
.auth-links a i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1200x400?text=Pharmacy+Shelves') no-repeat center center;
    background-size: cover;
    padding: 80px 20px;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Centered Search Container */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 30px;
}

.search-input-wrapper {
    display: flex;
    width: 100%;
    max-width: 600px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-input-wrapper input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 1.1rem;
    outline: none;
    background-color: #fff;
    color: #333;
}

.search-input-wrapper .search-button {
    background-color: #ffd700;
    color: #000;
    border: none;
    padding: 15px 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1.1rem;
}

.search-input-wrapper .search-button:hover {
    background-color: #ffc107;
}

/* Featured Services */
.featured-services {
    padding: 60px 20px;
    background-color: #F9F9F6;
}

.featured-services h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
}

.featured-services p {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background-color: #f5f5f5;
    padding: 10px;
}

.service-card .service-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card h3 {
    font-size: 1.5rem;
    margin: 0 0 10px;
    padding: 0;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.service-card p {
    color: #666;
    margin-bottom: 20px;
    padding: 0;
    flex: 1;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    font-size: 0.9rem;
    text-align: justify;
}

.service-card .btn {
    display: inline-block;
    background-color: #fff;
    color: #ffd700;
    border: 2px solid #ffd700;
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    margin: 0 0 10px;
    transition: background-color 0.3s, color 0.3s;
}

.service-card .btn:hover {
    background-color: #ffd700;
    color: #000;
}

/* Popular Medications */
.popular-medications {
    padding: 60px 20px;
    background-color: #F9F9F6;
}

.popular-medications h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
}

.popular-medications p {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.medications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Shop Page Specific Styles */
.medication-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.medication-card {
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.medication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.medication-card img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    background-color: #f5f5f5;
    padding: 10px;
}

.medication-card .product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.medication-card h3 {
    font-size: 1.2rem;
    margin: 0 0 10px;
    padding: 0;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-decoration: none;
    color: #333;
}

.medication-card p {
    color: #666;
    margin-bottom: 15px;
    padding: 0;
    flex: 1;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    font-size: 0.9rem;
    text-align: left;
}

.medication-card .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    margin: 10px 0 15px;
    padding: 0;
}

.medication-card .add-to-cart {
    display: block;
    width: 100%;
    background-color: #ffd700;
    color: #000;
    border: none;
    padding: 8px;
    border-radius: 0 0 10px 10px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    text-align: center;
    position: relative;
    z-index: 2;
}

.medication-card .add-to-cart:hover {
    background-color: #ffc107;
}

/* Remove old product-link styles since entire card is now clickable */
.product-link {
    display: none;
}

/* Ensure no text decoration on product name links */
.medication-card a {
    text-decoration: none;
    color: inherit;
}

/* Search Section */
.search-section {
    padding: 30px 0;
    background-color: #F9F9F6;
}

.search-box {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-box svg {
    padding: 15px;
    color: #666;
    width: 24px;
    height: 24px;
}

.search-box input {
    flex: 1;
    padding: 15px 10px;
    border: none;
    font-size: 1.1rem;
    outline: none;
}

.search-box form {
    display: flex;
    width: 100%;
}

/* Shop by Category */
.shop-by-category {
    padding: 40px 0;
    background-color: #F9F9F6;
}

.shop-by-category h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.category-btn {
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 25px;
    padding: 8px 20px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

.category-btn:hover {
    background-color: #f5f5f5;
}

.category-btn.active {
    background-color: #ffd700;
    color: #000;
    border-color: #ffd700;
}

/* Request Medicine */
.request-medicine {
    padding: 40px 0;
    text-align: center;
}

.request-button {
    background-color: #fff;
    color: #333;
    border: 2px solid #eaeaea;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.request-button:hover {
    background-color: #f5f5f5;
}

/* Consultation Page */
.consultation-page {
    padding: 60px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 1.1rem;
}

.consultation-form {
    max-width: 1000px;
    margin: 0 auto;
}

.form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.calendar-section {
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 20px;
    height: 515px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-button {
    background-color: #ffd700;
    border: 1px solid #eaeaea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-button:hover {
    background-color: #ffd700;
}

/* Calendar Grid Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    align-items: start;
}

.day-label {
    text-align: center;
    font-weight: bold;
    color: #666;
    padding: 8px 6px;
    background: transparent;
}

#calendar-days {
    display: contents;
}

.day-cell {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.03) inset;
    border: 1px solid rgba(0,0,0,0.03);
}

.day-cell:hover {
    background-color: #f5f5f5;
}

.day-cell.selected {
    background-color: #ffd700;
    color: #000;
    box-shadow: none;
}

.day-cell.empty {
    background-color: transparent;
    color: transparent;
    cursor: default;
    box-shadow: none;
    border: none;
}

.day-cell.disabled {
    color: #ccc;
    cursor: not-allowed;
    background-color: #f9f9f9;
}

.day-cell.disabled:hover {
    background-color: #f9f9f9 !important;
}

.form-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
}

.form-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.time-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.time-button {
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 25px;
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.time-button:hover {
    background-color: #f5f5f5;
}

.time-button.selected {
    background-color: #ffd700;
    color: #000;
    border-color: #ffd700;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-field input:focus {
    border-color: #ffd700;
}

.consultation-types {
    margin-bottom: 20px;
}

.consultation-type {
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.consultation-type:hover {
    background-color: #f5f5f5;
    border-color: #ffd700;
}

.consultation-type input[type="radio"] {
    display: none;
}

.consultation-type input[type="radio"]:checked + label {
    background-color: #fff9e6;
    border: 1px solid #ffd700;
    border-radius: inherit;
}

.consultation-type label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 5px;
}

.consultation-type label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #eaeaea;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
}

.consultation-type input[type="radio"]:checked + label::before {
    background-color: #ffd700;
    border-color: #ffd700;
}

.consultation-type input[type="radio"]:checked + label::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 10px;
    height: 10px;
    background-color: #000;
    border-radius: 50%;
}

.type-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.type-content p {
    color: #666;
    font-size: 0.9rem;
}

.book-button {
    display: block;
    width: 100%;
    background-color: #ffd700;
    color: #000;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.book-button:hover {
    background-color: #ffc107;
}

/* Search Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-results a {
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
}

.no-results a:hover {
    text-decoration: underline;
}

/* Style for error messages */
.error-message {
    color: red;
    font-size: 0.85rem;
    display: block;
    margin-top: 3px;
}

/* Bottom Navigation for Mobile */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eaeaea;
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease; /* Smooth transition for bottom nav */
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    max-width: 80px;
    min-height: 60px;
}

.bottom-nav .nav-item:hover {
    background-color: #f8f9fa;
    color: #333;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.bottom-nav .nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0;
    transition: all 0.3s ease;
    color: #666;
    order: 1;
}

.bottom-nav .nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    order: 2;
    margin-top: 0;
}

.bottom-nav .nav-item.active {
    color: #666;
    background: transparent;
}

.bottom-nav .nav-item.active i {
    color: #ffd700;
    transform: scale(1.1);
}

.nav-badge {
    position: absolute;
    top: 2px;
    right: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: bold;
    border: 2px solid white;
}

/* Fixed Mobile User Menu Styles */
.mobile-user-menu {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 80px;
    min-height: 60px;
    gap: 4px;
}

.mobile-user-dropdown {
    display: none !important;
}

.mobile-user-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
}

.mobile-user-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 6px 0;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
}

.mobile-user-button:hover {
    background-color: #f8f9fa;
}

.mobile-user-button i {
    font-size: 1.1rem;
    margin-bottom: 2px;
    order: 1;
}

.mobile-user-button .nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.1;
    order: 2;
    margin-top: 0;
}

.mobile-profile-button i {
    color: #4CAF50;
}

.mobile-logout-button i {
    color: #f44336;
}

.mobile-user-menu.active {
    background: linear-gradient(135deg, #fff9e6, #fff3cc);
}

.mobile-user-menu.active i:not(.mobile-profile-button i):not(.mobile-logout-button i) {
    color: #ffd700;
    transform: scale(1.1);
}

/* Profile Page Specific Styles */
.profile-page {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    text-align: center;
    margin-bottom: 40px;
}

.profile-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #333;
}

.profile-header p {
    color: #666;
    font-size: 1.1rem;
}

.profile-form {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.file-upload {
    border: 2px dashed #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: #ffd700;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload label {
    cursor: pointer;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.file-upload label i {
    font-size: 2rem;
    color: #ffd700;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn-save {
    background: linear-gradient(135deg, #ffd700, #ffc107);
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.btn-cancel {
    background: #fff;
    color: #333;
    border: 2px solid #e1e5e9;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #f8f9fa;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

/* Improved Form Styling */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    background-color: #fff;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Improved Button Styling */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #ffd700, #ffc107);
    color: #000;
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
    background: #fff;
    color: #333;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bottom nav animations */
@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    80% {
        transform: translateY(-2px);
    }
}

.bottom-nav .nav-item:active i {
    animation: bounce 0.5s ease;
}

/* Hide bottom nav on specific pages if needed */
.no-bottom-nav .bottom-nav {
    display: none;
}

.no-bottom-nav .main-content {
    padding-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        flex-shrink: 0;
    }
    
    /* === FIX: Logo on Mobile === */
    .logo img {
        height: 60px; /* Reduced height */
        width: auto; /* Maintain aspect ratio - FIXED */
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .bottom-nav {
        padding: 8px 5px;
        display: flex; /* Ensure it's displayed on mobile */
    }
    
    .bottom-nav .nav-item {
        margin: 0 2px;
        min-height: 65px;
    }
    
    .mobile-user-menu .mobile-user-buttons {
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: white;
        border: 1px solid #eaeaea;
        border-radius: 8px;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
        padding: 8px;
        margin-bottom: 10px;
        min-width: 80px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1001;
    }
    
    .mobile-user-menu.active .mobile-user-buttons {
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-user-button {
        padding: 8px 0;
        min-height: auto;
    }
    
    .mobile-user-button .nav-label {
        font-size: 0.6rem;
    }
    
    .main-content {
        padding-bottom: 70px; /* Space for bottom nav */
    }
    
    .footer {
        margin-bottom: 70px; /* Space for bottom nav */
    }
    
    .main-nav {
        display: none !important;
    }
    
    .header-actions .cart-icon {
        display: none;
    }
    
    .user-section {
        display: none;
    }
    
    .auth-links {
        display: none;
    }
    
    .header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .bottom-nav .nav-item {
        min-height: 60px;
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .search-container {
        padding: 0 20px;
        /* Ensure container itself doesn't overflow */
        box-sizing: border-box;
    }
    
    .search-input-wrapper {
        max-width: 100%;
        border-radius: 25px;
        /* Optional: Add a small gap between input and button if needed */
        /* gap: 2px; */ /* This requires display: flex on wrapper */
    }
    
    .search-input-wrapper input {
        padding: 12px 10px;
        font-size: 1rem;
        /* Ensure input can shrink if needed */
        min-width: 0;
        flex: 1; /* This is usually the default, but explicitly stating */
    }
    
    .search-input-wrapper .search-button {
        padding: 10px 15px; /* Further reduce padding */
        font-size: 0.9rem; /* Further reduce font size */
        min-width: 70px; /* Adjust minimum width */
        white-space: nowrap; /* Prevent text wrapping */
    }
    
    .form-container {
        grid-template-columns: 1fr;
    }
    
    .calendar-section {
        padding: 15px;
    }
    
    .calendar-grid {
        gap: 3px;
    }
    
    .day-cell {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .medications-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .medication-card img {
        height: 120px;
    }
    
    .shop-by-category h2 {
        font-size: 2rem;
    }
    
    .popular-medications h2 {
        font-size: 2rem;
    }
    
    .form-section {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 10px 12px;
    }
    
    .btn {
        padding: 10px 20px;
        width: 100%;
    }
    
    .mobile-user-dropdown {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .mobile-user-menu.active {
        color: #ffd700;
        background: linear-gradient(135deg, #fff9e6, #fff3cc);
    }
    
    .profile-page {
        padding: 20px 15px;
    }
    
    .profile-form {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-save, .btn-cancel {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .day-cell { 
        min-height: 44px; 
        padding: 8px; 
    }
}

@media (min-width: 769px) {
    .header-actions .cart-icon {
        display: block;
    }
    
    .user-section {
        display: flex;
    }
    
    .auth-links {
        display: flex;
    }
    
    .main-nav a i {
        display: none;
    }
    
    /* Ensure header is visible on desktop */
    .header {
        transform: translateY(0) !important;
    }
}   