body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding: 0; 
    background-color: #f9f9f9; 
    color: #333; 
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll from unexpected overflow */
}

/* New Payment Overlay Styles (Professional Look) */
.payment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* Entire screen turns white */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.payment-overlay.active {
    opacity: 1;
    visibility: visible;
}

.payment-loader {
    background-color: #ffffff;
    padding: 30px 40px; /* Adjusted padding for horizontal layout */
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: row; /* Arrange logo and details side-by-side */
    align-items: center; /* Vertically align items in the middle */
    gap: 25px; /* Space between logo and text/bar group */
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.payment-overlay.active .payment-loader {
    transform: translateY(0);
    opacity: 1;
}

.stripe-logo {
    width: 80px; /* Adjusted size for side-by-side layout */
    height: 80px;
    object-fit: contain;
    /* margin-bottom removed as it's now a row item */
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    animation: pulse-scale 1.5s infinite alternate;
    flex-shrink: 0; /* Prevent logo from shrinking */
}

@keyframes pulse-scale {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.payment-details {
    display: flex;
    flex-direction: column; /* Stack text and bar vertically */
    align-items: center; /* Center text and bar horizontally within their column */
    flex-grow: 1; /* Allow details section to take available space */
}

.payment-text {
    color: #333333;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    text-align: center; /* Ensure text is centered */
    white-space: nowrap; /* Keep text on one line for larger screens */
}

/* Modern Loading Bar */
.loader-bar {
    width: 100%; /* Make the bar 100% width of its parent (.payment-details) */
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.loader-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: #6772e5; /* Stripe's blue */
    animation: load-bar 2s infinite ease-in-out;
}

@keyframes load-bar {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: -100%; }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .payment-loader {
        flex-direction: column; /* Stack items vertically on smaller screens */
        padding: 30px;
        width: 85%;
        max-width: 300px;
        gap: 15px; /* Space between logo and text/bar group when stacked */
    }

    .stripe-logo {
        width: 80px;
        height: 80px;
        /* margin-bottom: 20px; */ /* No longer needed due to gap on parent */
    }

    .payment-details {
        align-items: center; /* Center text and bar when stacked vertically */
    }

    .payment-text {
        font-size: 1em;
        margin-bottom: 8px;
        white-space: normal; /* Allow text to wrap on smaller screens */
    }

    .loader-bar {
        width: 150px; /* Adjusted width for smaller screens */
    }
}

.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 15px; 
    box-sizing: border-box; /* Ensure padding doesn't add to width */
}

/* Top Bar - Shown on Desktop, Hidden on Mobile */
.top-bar { 
    background-color: #f1f1f1; 
    padding: 8px 0; 
    font-size: 0.85em; 
    border-bottom: 1px solid #e0e0e0; 
}
.top-bar .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.top-bar span, .top-bar a { 
    margin-right: 20px; 
    color: #555; 
    text-decoration: none; 
}
.top-bar a:hover { 
    color: #007bff; 
}

/* Header Base */
.header { 
    background-color: #fff; 
    /* border-bottom: 1px solid #e7e7e7; /* Border applied contextually */
}

/* Desktop Header Specifics */
.desktop-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0; 
    border-bottom: 1px solid #e7e7e7; 
}
.desktop-logo a { 
    font-size: 2.2em; 
    font-weight: 700; 
    color: #007bff; 
    text-decoration: none; 
}
.desktop-logo .pharmacy { 
    color: #5cb85c;
    margin-left: -10px;
}
.search-bar { /* Common search bar style */
    display: flex;
    align-items: center; 
    height: 40px; 
    box-sizing: border-box;
}
.search-bar input[type="text"] {
    padding: 10px; 
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    flex-grow: 1; 
    font-size: 0.9em;
    height: 100%; 
    box-sizing: border-box;
    border-right: none; 
}
.search-bar button {
    padding: 0 15px; 
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff; 
    border-left: none; 
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 0.9em;
    height: 100%; 
    box-sizing: border-box;
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
}
.search-bar button:hover {
    background-color: #0056b3;
}
.search-bar.desktop-search-bar { /* Specific instance for desktop header */
    width: 300px; 
    flex-grow: 0; 
}
.cart-info.desktop-cart-info { 
    background-color: #007bff; 
    color: white; 
    padding: 0 18px; 
    border-radius: 5px; 
    font-size: 1em; 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    height: 40px; 
    box-sizing: border-box;
}
.cart-info.desktop-cart-info:hover { background-color: #0056b3; }
.cart-info.desktop-cart-info .icon { font-size: 1.2em; }

/* Mobile Header Elements - Hidden by default for desktop */
.mobile-header-blue-bar { display: none; }
.search-bar-container.mobile-search-bar-container { display: none; } 
.mobile-nav-toggle.main-menu-toggle { display: none; }


.payment-icons i { font-size: 1.8em; margin: 0 5px; color: #555; }
.payment-icons .fa-cc-visa { color: #1A1F71; }
.payment-icons .fa-cc-mastercard { color: #EB001B; }
.payment-icons .fa-cc-amex { color: #0077A8; }
.payment-icons .fa-cc-discover { color: #FF6600; }
.payment-icons .fa-cc-jcb { color: #003A70; }

/* Desktop Navigation Bar */
.nav-bar.desktop-nav-bar { 
    background-color: #007bff; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    display: block; 
}
.nav-bar.desktop-nav-bar ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.nav-bar.desktop-nav-bar ul li a { color: white; text-decoration: none; padding: 15px 25px; display: block; font-weight: 500; text-transform: uppercase; font-size: 0.95em; }
.nav-bar.desktop-nav-bar ul li a:hover { background-color: #0056b3; }

/* Mobile Navigation Panel (Off-canvas style) - Hidden by default */
.main-nav-collapse { 
    display: none; 
    position: fixed; 
    top: 0;
    left: -280px; 
    width: 280px;
    height: 100%;
    background-color: #007bff;
    color: white;
    padding-top: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    z-index: 1001; 
    transition: left 0.3s ease;
    overflow-y: auto;
    box-sizing: border-box;
}
.main-nav-collapse.open {
    display: block !important; 
    left: 0; 
}
.main-nav-collapse ul { list-style: none; padding: 0; margin: 0; }
.main-nav-collapse ul li a { display: block; padding: 12px 20px; color: white; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 1em;}
.main-nav-collapse ul li:last-child a { border-bottom: none; }
.mobile-categories-toggle { display: block; background-color: transparent; color: white; padding: 12px 20px; border: none; width: 100%; text-align: left; font-size: 1em; border-bottom: 1px solid rgba(255,255,255,0.1); cursor: pointer; }
.mobile-categories-toggle i { margin-right: 8px; }
.categories-collapse { display: none; padding-left: 20px; background-color: #005cbf; }
.categories-collapse.open { display: block; }
.categories-collapse ul li a { font-size: 0.95em; padding: 10px 20px; color: #e0e0e0; border-bottom: 1px solid rgba(255,255,255,0.05); display:block; text-decoration:none;}
.categories-collapse ul li:last-child a { border-bottom: none; }
.categories-collapse ul li a:hover { color: #fff; background-color: rgba(255,255,255,0.1); }


/* Main Content & Layout */
.main-content-wrapper { padding: 30px 0; width: 100%; box-sizing: border-box; }
.main-layout-container { display: flex; flex-wrap: nowrap; width: 100%; box-sizing: border-box;}
.sidebar.desktop-sidebar { width: 23%; background-color: #fff; padding: 20px; border-radius: 5px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-right: 2%; box-sizing: border-box;}
.sidebar.desktop-sidebar h3 { font-size: 1.2em; color: #333; margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; }
.sidebar.desktop-sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar.desktop-sidebar ul li a { display: block; padding: 9px 0; color: #007bff; text-decoration: none; font-size: 0.95em; transition: color 0.2s ease; }
.sidebar.desktop-sidebar ul li a:hover { text-decoration: none; color: #0056b3; }
.products-area { width: 75%; background-color: #fff; padding: 20px; border-radius: 5px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); box-sizing: border-box;}
.search-by-name.desktop-search-by-name { margin-bottom: 20px; font-size: 0.9em; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.search-by-name.desktop-search-by-name a { margin-right: 6px; text-decoration: none; color: #007bff; padding: 3px 5px; border-radius: 3px; }
.search-by-name.desktop-search-by-name a:hover { background-color: #e9ecef; color: #0056b3; }
.category-title { background-color: #5cb85c; color: white; padding: 12px 18px; font-size: 1.4em; margin-bottom: 20px; border-radius: 5px 0 0 5px; position: relative; font-weight: 600; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.product-card { background-color: #fff; border: 1px solid #e7e7e7; padding: 15px; text-align: center; position: relative; border-radius: 5px; transition: box-shadow 0.3s ease; }
.product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.product-card .stock-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    font-size: 0.75em;
    font-weight: bold;
    border-radius: 3px;
    color: white;
    text-transform: uppercase;
}
.product-card .stock-status.in-stock {
    background-color: #28a745; /* Green for in stock */
    border-radius: 12px;
}
/* Example for out of stock, if you add that logic later
.product-card .stock-status.out-of-stock { 
    background-color: #dc3545; 
}
*/

.product-card .discount, .product-card .discount-pink { position: absolute; top: 10px; left: 10px; color: white; padding: 4px 7px; font-size: 0.8em; font-weight: bold; border-radius: 3px; }
.product-card .discount { background-color: #ffc107; color: #333; } 
.product-card .discount-pink { background-color: #e83e8c; } 
.product-card img.product-image-placeholder { width: 100%; max-width: 150px; height: 150px; object-fit: contain; margin: 10px auto 15px auto; display: block; border: 1px solid #eee; border-radius: 4px; }
.product-card h4 { font-size: 1em; margin: 0 0 5px 0; color: #333; font-weight: 600; }
.product-card h4.product-name-truncated {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em; /* Approximate height for 2 lines based on font-size and line-height */
    line-height: 1.4em; /* Adjust as needed */
}
.product-card h4 a { color: #007bff; text-decoration: none; }
.product-card h4 a:hover { text-decoration: underline; }
/* .product-card .details class was removed from index.php product cards */
.product-card .price { font-size: 1.2em; font-weight: bold; color: #28a745; margin-bottom: 5px; } 
.product-card .msrp { font-size: 0.8em; color: #6c757d; text-decoration: line-through; margin-bottom: 10px; }
.product-card .select-pack-btn, .add-to-cart-btn { background-color: #007bff; color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; font-size: 0.95em; font-weight: 500; transition: background-color 0.2s ease; }
.product-card .select-pack-btn:hover, .add-to-cart-btn:hover { background-color: #0056b3; }
.add-to-cart-btn { background-color: #28a745; }
.add-to-cart-btn:hover { background-color: #218838; }

.product-options {
    margin-bottom: 20px; /* Space below product options */
}

.product-option-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px; /* Space between each option item */
}

.product-option-item label {
    font-weight: bold;
    color: #555;
    margin-right: 10px;
    white-space: nowrap; /* Prevent label from wrapping */
    min-width: 80px; /* Give labels a consistent minimum width */
}

.product-option-item .product-option-select {
    flex-grow: 1; /* Allow select to take remaining space */
    margin-bottom: 0; /* Remove bottom margin specific to selects */
}

.product-quantity-selector {
    display: flex;
    align-items: center;
    margin-top: 15px; /* Space above the quantity selector */
    margin-bottom: 15px; /* Space below the quantity selector */
}

.product-quantity-selector label {
    font-weight: bold;
    color: #555;
    margin-right: 10px;
    white-space: nowrap; /* Prevent label from wrapping */
    min-width: 80px; /* Consistent minimum width with option labels */
    margin-bottom: 0; /* Remove default block label margin */
}

/* Footer */
.footer {
    background-color: #343a40;
    color: #f8f9fa;
    padding: 30px 0;
    font-size: 0.9em;
    margin-top: 40px;
    text-align: center; /* Fallback for older browsers */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* Space between links */
    margin-bottom: 15px; /* Space between links and copyright */
    padding: 0 10px; /* Add some horizontal padding */
}

.footer-links a {
    color: white; /* Changed to white */
    text-decoration: none; /* No text decoration */
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    white-space: nowrap; /* Prevent links from breaking in half */
    font-size: 1.05em; /* Slightly larger font size */
}

.footer-links a:hover {
    background-color: #495057; /* Slightly lighter background on hover */
}

.footer-copyright {
    color: #adb5bd; /* Slightly lighter color for copyright */
    font-size: 0.85em;
    margin-top: 10px; /* Ensure it's on a new line and spaced */
}

/* Cart Page Specific Styles */
.cart-page-title { text-align: left; font-size: 1.8em; color: #333; margin-bottom: 20px; font-weight: 600; border-bottom: 1px solid #e0e0e0; padding-bottom: 10px; }
.cart-table { border: 1px solid #e9ecef; margin-bottom: 25px; width: 100%; border-radius: 5px; overflow: hidden; }
.cart-table th { background-color: #f8f9fa; color: #495057; font-weight: 600; padding: 15px; text-align: left; font-size: 0.9em; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid #dee2e6; }
.cart-table th.product-image-cell-header { width: 12%; text-align: center;}
.cart-table th.product-name-header { width: 33%; }
.cart-table th.quantity-header { width: 10%; text-align: center; }
.cart-table th.price-header { width: 15%; text-align: right; }
.cart-table th.subtotal-header { width: 15%; text-align: right; }
.cart-table th.action-header { width: 15%; text-align: center; }
.cart-table td { padding: 15px; vertical-align: middle; border-bottom: 1px solid #e9ecef; font-size: 0.95em; }
.cart-table tr:last-child td { border-bottom: none; }
.cart-table .product-image-cell { text-align: center; }
.cart-table .product-image-placeholder { width: 70px; height: 70px; object-fit: contain; border-radius: 3px; }
.cart-table .product-name a { font-weight: 500; color: #007bff; font-size: 1em; }
.cart-table .item-price, .cart-table .item-subtotal { font-weight: 500; color: #333; font-size: 0.95em; }
.cart-table .remove-item-link { color: #007bff; text-decoration: none; font-size: 0.85em; font-weight: 500; }
.cart-table .remove-item-link:hover { color: #dc3545; text-decoration: underline; }
.cart-totals-section { text-align: right; margin-bottom: 20px; padding-top: 15px; border-top: 1px solid #e0e0e0; }
.cart-totals-section .total-label { font-size: 1.1em; font-weight: 500; color: #333; margin-right: 10px; }
.cart-totals-section .total-amount { font-size: 1.4em; font-weight: 700; color: #28a745; }
.cart-totals-section .item-count-note { font-size: 0.85em; color: #6c757d; display: block; margin-top: 3px; }
.cart-actions-area { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid #e0e0e0; margin-top: 10px; }
.cart-actions-left .btn, .cart-actions-right .btn { font-weight: 500; text-decoration: none; }
.cart-actions-left .continue-shopping { background-color: #6c757d; color: white; padding: 10px 20px; }
.cart-actions-left .continue-shopping:hover{ background-color: #5a6268;}
.cart-actions-left .clear-cart { background-color: transparent; color: #dc3545; border: 1px solid #dc3545; padding: 9px 18px; margin-left: 10px; }
.cart-actions-left .clear-cart:hover { background-color: #dc3545; color: white; }
.cart-actions-right .checkout { background-color: #28a745; color: white; font-size: 1.15em; padding: 12px 30px; font-weight: 600; }
.cart-actions-right .checkout:hover { background-color: #218838; }
.empty-cart-message { text-align: center; font-size: 1.1em; color: #555; padding: 30px 20px; background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 5px; }
.empty-cart-message p { margin-bottom: 20px; }
.empty-cart-message .btn { margin-top: 15px; }

/* Utility for messages */
.message-feedback { padding: 10px 15px; margin-bottom: 20px; border-radius: 4px; font-size: 0.95em; }
.message-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message-info { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.message-error { background-color: #f8d7da; color: #721c24; border:1px solid #f5c6cb; } 

/* Responsive Design Adjustments */
.category-description {
    text-align: justify;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    line-height: 1.8;
    color: #555;
}

@media (max-width: 768px) {
    .category-description {
        padding: 10px;
        margin-bottom: 15px;
    }
}

@media (max-width: 992px) { 
    .container { max-width: 100%; padding: 0 20px; } 
    .sidebar.desktop-sidebar { width: 30%; }
    .products-area { width: 68%; }
    .desktop-header-content .desktop-logo a { font-size: 2em; } 
    .search-bar.desktop-search-bar input[type="text"] { width: 200px; }
    .nav-bar.desktop-nav-bar ul li a { padding: 15px 20px; font-size: 0.9em; }
    .product-card img.product-image-placeholder { max-width: 130px; height: 130px;}
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* Product Options styles */
.product-options select { 
    padding: 12px 20px; /* Match add-to-cart-btn padding */
    border-radius: 4px; 
    border: 1px solid #ced4da; 
    width: 100%; /* Make it full width */
    box-sizing: border-box; /* Include padding in width */
    font-size: 1.1em; /* Match add-to-cart-btn font size */
    height: 48px; /* Approximate height of add-to-cart-btn */
    appearance: none; /* Remove default select styling */
    background-color: #f8f9fa; /* Light background */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2C197.8L159.2%2C69.9c-3.7-3.7-9.8-3.7-13.5%2C0L5.4%2C197.8c-3.7%2C3.7-3.7%2C9.8%2C0%2C13.5l13.5%2C13.5c3.7%2C3.7%2C9.8%2C3.7%2C13.5%2C0l114.5-114.5l114.5%2C114.5c3.7%2C3.7%2C9.8%2C3.7%2C13.5%2C0l13.5-13.5C290.7%2C207.6%2C290.7%2C201.4%2C287%2C197.8z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1em;
    margin-bottom: 15px; /* Space between selects */
}

/* Image Zoom Overlay Styles */
.image-zoom-overlay {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    cursor: zoom-out; /* Indicate it's clickable to close */
}

.image-zoom-overlay.open {
    display: flex; /* Show when open */
}

.zoomed-image {
    max-width: 90%;
    max-height: 90%;
    display: block; /* Remove extra space below image */
    margin: auto; /* Center image within flex container */
    border: 3px solid white; /* Optional: adds a border */
    box-shadow: 0 0 20px rgba(0,0,0,0.7); /* Optional: adds shadow */
    object-fit: contain; /* Ensure image fits without cropping */
}

.close-zoom-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001; /* Ensure close button is above image */
}

.close-zoom-btn:hover,
.close-zoom-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Responsive adjustments for zoom overlay */
@media (max-width: 768px) { 
    .top-bar { display: none !important; } 
    .header { padding: 0 !important; border-bottom: none; } 
    .desktop-header-content { display: none !important; } 
    .nav-bar.desktop-nav-bar { display: none !important; } 
    
    .mobile-header-blue-bar {
        display: flex !important; 
        background-color: #007bff; 
        color: white;
        padding: 10px 0;
    }
    .mobile-header-blue-bar .container {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100%; 
    }
    .mobile-nav-toggle.main-menu-toggle { 
        display: inline-flex !important; 
        background-color: transparent !important; 
        padding: 5px 10px !important;
        font-size: 1.4em !important; 
        border: none !important; 
        color: white !important; 
        cursor: pointer;
    }
    .mobile-nav-toggle.main-menu-toggle i { margin-right: 0 !important; } 
    .mobile-nav-toggle.main-menu-toggle span { display: none !important; } 

    .mobile-logo { 
        flex-grow: 1;
        text-align: center;
    }
    .mobile-logo a { font-size: 1.3em; font-weight: 600; color: white !important; text-decoration: none !important;}
    .mobile-logo .pharmacy { color: #5cb85c !important; font-weight: 600; margin-left: -5px;} 
    
    .cart-info.mobile-cart-icon { 
        color: white !important;
        font-size: 1.4em !important; 
        text-decoration: none !important;
        position: relative;
        padding: 5px !important;
        display: inline-flex !important; 
        align-items: center;
        background-color: transparent !important; 
        height: auto; 
    }
    .cart-count-badge {
        position: absolute;
        top: -5px;
        right: -8px;
        background-color: #28a745; 
        color: white;
        border-radius: 50%;
        padding: 1px 5px;
        font-size: 0.65em;
        font-weight: bold;
        line-height: 1;
        border: 1px solid white;
    }

    .search-bar-container.mobile-search-bar-container { 
        display: block !important; 
        padding: 10px 15px; 
        background-color: #fff; 
        border-bottom: 1px solid #e7e7e7;
    }
    .search-bar-container.mobile-search-bar-container .search-bar.common-search-bar { width: 100%; height: 38px; } 
    .search-bar-container.mobile-search-bar-container .search-bar.common-search-bar input[type="text"] { width: 100%; font-size: 0.9em; }
    .search-bar-container.mobile-search-bar-container .search-bar.common-search-bar button { font-size: 1em; }

    .main-content-wrapper { padding-top: 10px; width: 100%; box-sizing: border-box; } 
    .main-content-wrapper .main-layout-container { flex-direction: column !important; width: 100%; box-sizing: border-box;}
    .sidebar.desktop-sidebar { display: none !important; } 
    .main-layout-container > .products-area { width: 100% !important; margin-right: 0 !important; margin-bottom: 20px !important; box-sizing: border-box;}
    .search-by-name.desktop-search-by-name { display: none; } 

    .products-grid { 
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Two products per line */
        gap: 15px; 
    }
    .product-card {
        /* Adjust padding/margin if needed for 2-column layout */
    }
    .product-card img.product-image-placeholder { max-width: 100%; height: auto; max-height: 140px; /* Adjust as needed */}
    .product-card h4 { font-size: 0.9em; }
    .product-card .price { font-size: 1em; }
    .product-card .select-pack-btn, .add-to-cart-btn { font-size: 0.85em; padding: 8px 12px; }

    .product-detail-view { flex-direction: column; }
    .product-image-section, .product-info-section { flex: 1 1 100%; }
    .product-image-placeholder-large { max-width: 100%; height: auto; max-height: 300px; } 
    .product-info-section h2 { font-size: 1.6em; }
    .product-info-section .price { font-size: 1.4em; }

    .footer .container { padding-left: 10px; padding-right: 10px; }
    
    /* Cart Table Mobile Styles */
    .cart-table thead {
        display: none;
    }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
        display: block;
        width: 100%;
    }
    .cart-table tr {
        margin-bottom: 1rem;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 1rem;
        background: #fff;
    }
    .cart-table td {
        padding: 0.75rem 0;
        border-bottom: 1px dotted #ccc;
        display: grid;
        grid-template-columns: 40% 60%;
        align-items: center;
    }
    .cart-table tr td:last-child {
        border-bottom: none;
    }
    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        color: #333;
    }
    .cart-table td.product-image-cell {
        display: block;
        padding: 1rem 0;
        text-align: center;
    }
    .cart-table td.product-image-cell::before {
        display: none;
    }
    .cart-table .product-name a {
        color: #007bff;
        font-weight: 500;
    }

    /* Cart Totals Mobile Styles */
    .cart-totals-section {
        text-align: center; /* Center align for mobile */
        padding: 15px;
        background-color: #f8f9fa;
        border-radius: 8px;
        margin-top: 20px;
    }
    .cart-totals-section .total-label, .cart-totals-section .total-amount {
        display: block;
        width: 100%;
        margin-bottom: 5px;
    }
    .cart-totals-section .total-label {
        font-size: 1.1em;
        font-weight: 500;
        color: #333;
    }
    .cart-totals-section .total-amount {
        font-size: 1.5em;
        font-weight: 700;
        color: #28a745;
    }

    /* Cart Actions Mobile Styles */
    .cart-actions-area {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }
    .cart-actions-left {
        width: 100%;
        display: flex;
        flex-direction: row; /* Side-by-side buttons */
        gap: 10px;
    }
    .cart-actions-right {
        width: 100%;
        display: flex;
    }
    .cart-actions-left .btn, .cart-actions-right .btn {
        flex-grow: 1;
        margin-left: 0;
        padding: 15px 10px;
        font-size: 1em;
        text-align: center;
    }
}

/* Styles for pages.php */
.page-content-wrapper {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.page-article-content {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    background-color: #fdfdfd;
    font-family: 'Special Elite', monospace; /* "Dactylo" style font */
    line-height: 1.8;
    color: #333;
    font-size: 1.05em;
}

.page-article-content h1, .page-article-content h2, .page-article-content h3 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Keep headings readable */
    color: #007bff;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.page-article-content p {
    margin-bottom: 15px;
}

.page-article-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.page-article-content a {
    color: #007bff;
    text-decoration: underline;
}

.page-article-content a:hover {
    color: #0056b3;
}

.page-actions {
    text-align: center;
    margin-top: 20px;
}

.fixed-bottom-button-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f8f9fa; /* Light background for the bar */
    padding: 15px 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    z-index: 1000; /* Ensure it stays on top */
    text-align: center;
    box-sizing: border-box;
}

.fixed-bottom-button-container .btn {
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* Form Control Styles (for admin/website_settings.php) */
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.9em;
    height: 40px; /* Consistent height with search bar input */
}

.quantity-input {
    width: 100%; /* Make it full width */
    padding: 12px 10px; /* Adjust padding for better look */
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: center;
    font-size: 1.1em; /* Larger font size */
    margin-bottom: 15px; /* Space below input */
    box-sizing: border-box;
    -moz-appearance: textfield; /* Hide Firefox number input arrows */
}

/* Hide Chrome, Safari, Edge, Opera number input arrows */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-quantity-selector label {
    display: block; /* Make label take full width */
    margin-bottom: 8px; /* Space between label and input */
    font-weight: bold;
    color: #555;
    margin-right: 10px;
}

.form-control:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-group textarea.form-control {
    height: auto;
    min-height: 80px;
    padding: 10px;
}

/* General Button Styles (for admin/website_settings.php) */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.95em;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Product CTA Button Specific Styling */
.product-page-cta {
    width: 100%; /* Make button full width */
    font-size: 1.2em; /* Larger font for more impact */
    padding: 15px 20px; /* Increased padding */
    margin-top: 10px; /* Space above button */
    border-radius: 8px; /* More rounded corners */
    text-transform: uppercase; /* Uppercase text */
    letter-spacing: 1px; /* Spaced out letters */
    font-weight: 700; /* Bolder text */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Subtle shadow */
    transition: all 0.3s ease-in-out; /* Smooth transitions for hover/active */
}

/* Animation for improved CTR */
.product-page-cta:hover {
    transform: translateY(-2px); /* Lift effect on hover */
    box-shadow: 0 6px 10px rgba(0,0,0,0.15); /* Enhanced shadow on hover */
}

.product-page-cta:active {
    transform: translateY(0); /* Push down effect on click */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Reduced shadow on click */
}

/* Keyframe for a subtle pulse animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

.product-page-cta {
    animation: pulse 2s infinite; /* Apply pulse animation */
}

@media (max-width: 576px) { 
    .mobile-header-blue-bar .container .mobile-logo a { font-size: 1.1em; } 
    .mobile-nav-toggle.main-menu-toggle { font-size: 1.2em; padding: 5px 8px;}
    .cart-info.mobile-cart-icon { font-size: 1.2em; padding: 5px 8px;}
    .cart-count-badge { font-size: 0.55em; padding: 1px 4px; top: 0px; right: -3px;}

    .search-bar-container.mobile-search-bar-container { padding: 8px 10px; }
    .search-bar.common-search-bar { height: 36px; } 
    .search-bar.common-search-bar input[type="text"] { font-size: 0.85em; }
    .search-bar.common-search-bar button { padding: 0 12px; font-size: 0.85em; }
    
    .main-nav-collapse ul li a { font-size: 0.95em; padding: 10px 15px; }
    .mobile-categories-toggle { font-size: 0.95em; padding: 10px 15px; }
    .categories-collapse ul li a { font-size: 0.9em; padding: 8px 15px; }
    
    .products-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    .product-card { padding: 10px; }
    .product-card img.product-image-placeholder { max-width: 100%; height: auto; max-height: 120px;}
    .product-card h4 { font-size: 0.85em; }
    .product-card .price { font-size: 0.95em; }
    /* .product-card .details class was removed from index.php product cards */

    .category-title { font-size: 1.2em; padding: 10px 15px; }
    
    .product-info-section h2 { font-size: 1.4em; }
    .product-info-section .price { font-size: 1.3em; }
    .add-to-cart-btn { width: 100%; box-sizing: border-box; } 
    .back-link { width: 100%; box-sizing: border-box; text-align: center; margin-bottom: 10px; }
}

/* Styles for Featured Category Sections */
.featured-category-section {
    margin-bottom: 40px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.featured-category-section .category-title {
    background-color: #007bff; /* Blue for featured category titles */
    color: white;
    padding: 12px 18px;
    font-size: 1.5em;
    margin-bottom: 20px;
    border-radius: 5px; /* Slightly more rounded corners */
    font-weight: 600;
    text-align: center; /* Center the title */
}

.category-button-container {
    text-align: center;
    margin-top: 25px;
}

.view-category-btn {
    background-color: #28a745; /* Green button */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: inline-block; /* Allows padding and margin */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.view-category-btn:hover {
    background-color: #218838; /* Darker green on hover */
    transform: translateY(-1px); /* Slight lift effect */
}

@media (max-width: 768px) {
    .featured-category-section {
        padding: 15px;
        margin-bottom: 30px;
    }

    .featured-category-section .category-title {
        font-size: 1.3em;
        padding: 10px 15px;
    }

    .view-category-btn {
        padding: 10px 20px;
        font-size: 1em;
    }
}

@media (max-width: 576px) {
    .featured-category-section .category-title {
        font-size: 1.1em;
        padding: 8px 10px;
    }

    .view-category-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}
