/**
 * Products Section Styles
 * Dedicated CSS for the featured products section
 */

/* Featured Products Section */
.featured-products-section {
    background-color: white;
    padding: 40px 0 0 0;
    overflow: visible;
}

.featured-products-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: visible;
    position: relative;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.featured-btn {
    background-color: #ff6b35;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.featured-btn:hover {
    background-color: #e5562e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* Mobile Category Dropdown */
.category-dropdown-mobile {
    display: none; /* Hidden on desktop */
    margin-bottom: 30px;
    max-width: 100%;
    position: relative;
    z-index: 10;
}

.category-select-mobile {
    width: 100%;
    height: 52px;
    padding: 12px 40px 12px 16px;
    border: 2px solid #FFEDE4;
    border-radius: 12px;
    background-color: #FFEDE4;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #e09975;
    cursor: pointer;
    outline: none;
    
    /* Remove default styling */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* Custom arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23e09975' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    
    /* Text handling */
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: visible;
    
    /* Interaction */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    
    /* Touch optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    
    /* Position for dropdown */
    position: relative;
    z-index: 100;
}

.category-select-mobile:focus {
    border-color: #e09975;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(224, 153, 117, 0.2);
    z-index: 101;
}

.category-select-mobile:active {
    transform: translateY(1px);
}

/* Style the dropdown options */
.category-select-mobile option {
    padding: 12px 16px;
    background-color: #fff;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.category-select-mobile option:checked,
.category-select-mobile option:hover {
    background-color: #FFEDE4;
    color: #e09975;
}

/* Product Categories Pills */
.product-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.category-pill {
    border: none;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 75px;
    box-sizing: border-box;
    position: relative;
    outline: none; /* Remove default focus outline */
}

.category-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.category-pill:focus {
    outline: none; /* Ensure no outline on focus */
}

/* Category pill icons */
.category-pill .pill-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    flex-shrink: 0;
    order: 2;
}

/* Category pill text */
.category-pill span {
    order: 1;
    flex: 1;
    text-align: left;
}

/* Featured Products category styling */
.category-pill.featured-products {
    background-color: #FFEDE4;
    color: #e09975;
    font-weight: 600;
}

.category-pill.featured-products:hover {
    background-color: #e09975;
    color: #ffffff;
}
.category-pill.featured-products:active {
    background-color: #e09975 !important;
    color: #ffffff !important;
}

/* Active state for Featured Products */
button.category-pill.featured-products.active,
.category-pill.featured-products.active {
    background-color: #e09975 !important;
    color: #ffffff !important;
}

/* Individual category colors based on exact palette */
.category-pill[data-category="desogestrel"] {
    background-color: #FFEDE4;
    color: #CA7070;
    font-weight: 600;
}

.category-pill[data-category="desogestrel"]:hover {
    background-color: #b85d5d;
    color: #ffffff;
}

button.category-pill[data-category="desogestrel"].active,
.category-pill[data-category="desogestrel"].active {
    background-color: #b85d5d !important;
    color: #ffffff !important;
}

.category-pill[data-category="drospirenone"] {
    background-color: #FFEDE4;
    color: #9E7B2A;
    font-weight: 600;
}

.category-pill[data-category="drospirenone"]:hover {
    background-color: #8b6922;
    color: white;
    font-weight: 600;
}

button.category-pill[data-category="drospirenone"].active,
.category-pill[data-category="drospirenone"].active {
    background-color: #8b6922 !important;
    color: white !important;
    font-weight: 600 !important;
}

.category-pill[data-category="ethy-diaceta"] {
    background-color: #FFEDE4;
    color: #CA7070;
    font-weight: 600;
}

.category-pill[data-category="ethy-diaceta"]:hover {
    background-color: #CA7070;
    color: white;
    font-weight: 600;
}

button.category-pill[data-category="ethy-diaceta"].active,
.category-pill[data-category="ethy-diaceta"].active {
    background-color: #CA7070 !important;
    color: white !important;
    font-weight: 600 !important;
}

.category-pill[data-category="norgestrel"] {
    background-color: #FFEDE4;
    color: #C95AC0;
    font-weight: 600;
}

.category-pill[data-category="norgestrel"]:hover {
    background-color: #C95AC0;
    color: #ffffff;
    font-weight: 600;
}

button.category-pill[data-category="norgestrel"].active,
.category-pill[data-category="norgestrel"].active {
    background-color: #C95AC0 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.category-pill[data-category="norethindrone"] {
    background-color: #FFEDE4;
    color: #D83F3F;
    font-weight: 600;
}

.category-pill[data-category="norethindrone"]:hover {
    background-color: #D83F3F;
    color: #ffffff;
    font-weight: 600;
}

button.category-pill[data-category="norethindrone"].active,
.category-pill[data-category="norethindrone"].active {
    background-color: #D83F3F !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.category-pill[data-category="norgestimate"] {
    background-color: #FFEDE4;
    color: #3E4FE1;
    font-weight: 600;
}

.category-pill[data-category="norgestimate"]:hover {
    background-color: #3E4FE1;
    color: #ffffff;
    font-weight: 600;
}

button.category-pill[data-category="norgestimate"].active,
.category-pill[data-category="norgestimate"].active {
    background-color: #3E4FE1 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.category-pill[data-category="levonorgestrel"] {
    background-color: #FFEDE4;
    color: #60936C;
    font-weight: 600;
}

.category-pill[data-category="levonorgestrel"]:hover {
    background-color: #60936C;
    color: #ffffff;
    font-weight: 600;
}

button.category-pill[data-category="levonorgestrel"].active,
.category-pill[data-category="levonorgestrel"].active {
    background-color: #60936C !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    max-width: 1465px;
    margin-left: auto;
    margin-right: auto;
    align-items: stretch;
}

/* Force 2 columns for tablets and medium screens */
@media (max-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* Product Content Layout */
.product-content {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
}

/* Product Image */
.product-image {
    flex: 0 0 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    height: 150px;
    box-sizing: border-box;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Product Info */
.product-info {
    flex: 1;
    padding-right: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-type {
    color: #666;
    font-weight: 400;
    font-size: 16px;
}

.product-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-description strong {
    color: #333;
    font-weight: 600;
}

.product-details {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-mechanism {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

/* Product Price & Actions */
.product-actions {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.product-price {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.btn-buy-now {
    background-color: #ff6b35;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3);
}

.btn-buy-now:hover {
    background-color: #e5562e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.product-link {
    color: #4a90e2;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
    text-align: center;
    padding: 0 20px 15px 20px;
    display: block;
}

.product-link:hover {
    color: #357abd;
}

/* Disclaimer */
.disclaimer {
    padding: 20px;
    margin: 40px auto;
    text-align: center;
    max-width: 800px;
}

.disclaimer p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Your Choice Section */
.your-choice-section {
    background-color: #FFFAF5;
    padding: 80px 0;
    text-align: center;
}

.your-choice-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.your-choice-title {
    font-size: 48px;
    font-weight: 700;
    color: #707070;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.highlight-orange {
    color: #ff6b35;
}

.your-choice-subtitle {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    /* max-width: 800px; */
    margin: 0 auto;
}

/* Your Choice Section Responsive */
/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1280px) {
    .your-choice-section {
        padding: 70px 0;
    }
    
    .your-choice-content {
        padding: 0 30px;
    }
    
    .your-choice-title {
        font-size: 42px;
        margin-bottom: 18px;
    }
    
    .your-choice-subtitle {
        font-size: 17px;
        line-height: 1.6;
    }
}

@media (max-width: 768px) {
    .your-choice-section {
        padding: 60px 0;
    }
    
    .your-choice-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .your-choice-subtitle {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .your-choice-section {
        padding: 40px 0;
    }
    
    .your-choice-content {
        padding: 0 15px;
    }
    
    .your-choice-title {
        font-size: 28px;
        line-height: 1.3;
    }
    
    .your-choice-subtitle {
        font-size: 15px;
    }
}

/* Responsive Design */
/* Tablet specific optimizations (769px - 1280px - iPad Pro, etc) */
@media (min-width: 769px) and (max-width: 1280px) {
    .featured-products-section {
        padding: 40px 0 20px 0;
    }
    
    .featured-products-section .container {
        max-width: 100%;
        padding: 0 25px;
    }
    
    .product-categories {
        grid-template-columns: repeat(4, 1fr);
        max-width: 950px;
        gap: 10px;
        margin-bottom: 35px;
    }
    
    .category-pill {
        padding: 14px 18px;
        font-size: 14px;
        height: 65px;
        gap: 10px;
    }
    
    .category-pill .pill-icon {
        width: 38px;
        height: 38px;
    }
    
    /* Ensure 2 columns on tablets */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
        margin-bottom: 35px;
    }
}

@media (max-width: 1024px) {
    .product-content {
        flex-direction: column;
    }
    
    .product-image {
        flex: none;
        width: 100%;
        height: 150px;
        margin-bottom: 15px;
    }
    
    .product-info {
        padding-right: 0;
        margin-bottom: 15px;
    }
    
    .product-actions {
        flex: none;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }
    
    .btn-buy-now {
        width: auto;
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    /* Show dropdown, hide pills on mobile */
    .category-dropdown-mobile {
        display: block;
        margin-bottom: 30px;
        overflow: visible;
    }
    
    .featured-products-section {
        overflow: visible;
    }
    
    .featured-products-section .container {
        overflow: visible;
    }
    
    .product-categories {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-content {
        padding: 15px;
        flex-direction: column;
    }
    
    .product-image {
        flex: none;
        align-self: center;
        margin-bottom: 15px;
        width: 120px;
        height: 120px;
    }
    
    .product-info {
        padding-right: 0;
        margin-bottom: 15px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        align-items: center;
    }
    
    .btn-buy-now {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .product-price {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .product-link {
        padding: 5px 15px 10px 15px;
    }
}

@media (max-width: 480px) {
    .featured-products-section {
        padding: 30px 0 40px 0;
    }
    
    /* Dropdown remains visible, pills remain hidden */
    .category-dropdown-mobile {
        display: block;
        margin-bottom: 25px;
    }
    
    .category-select-mobile {
        height: 48px;
        font-size: 16px; /* Keep 16px to prevent iOS zoom */
        padding: 10px 38px 10px 14px;
        background-size: 18px 18px;
    }
    
    .product-categories {
        display: none;
    }
    
    .product-card {
        margin: 0 5px;
    }
    
    .featured-products-section .container {
        padding: 0 15px;
    }
}

/* Animation for filtering */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.product-card.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Hero Product Card Styles (Inspired by Edmeds) */
.product-card-hero {
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 450px;
    position: relative;
    gap: 15px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.product-card-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.product-image-hero {
    flex-shrink: 0;
    width: 235px;
    min-width: 160px;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: 5px;
    gap: 2px;
    box-sizing: border-box;
}

.product-image-hero img {
    max-width: 250px;
    height: auto;
    object-fit: contain;
}

.product-content-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0;
    min-width: 0;
    max-width: 100%;
    justify-content: space-between;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.product-name-hero {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.2;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.product-name-highlight {
    color: #ff6b35;
}

.product-meta-hero {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-info-hero {
    text-align: left;
    /* margin-bottom: 25px; */
    flex: 0 1 auto;
    /* display: flex !important; */
    flex-direction: column;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: 80px;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-info-hero p {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    margin: 0;
    display: block !important;
    visibility: visible !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-info-hero li {
    font-size: 11px;
    line-height: 1.5;
    color: #333;
    margin: 0;
    display: block !important;
    visibility: visible !important;
}
.product-actions-hero {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: auto;
    flex-shrink: 0;
    flex-grow: 0;
    padding-bottom: 10px;
}

.dosage-select-wrapper-hero {
    margin-bottom: 15px;
}

.dosage-count-container {
    display: flex;
    gap: 10px;
}

.dosage-select-group,
.count-select-group {
    flex: 1;
}

.dosage-select-hero,
.count-select-hero {
    width: 100%;
    height: 52px;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background-color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
    outline: none;
    
    /* Remove default styling */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* Custom arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    
    /* Text handling */
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    
    /* Interaction */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    
    /* Touch optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dosage-select-hero:focus,
.count-select-hero:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.dosage-select-hero:hover,
.count-select-hero:hover {
    border-color: #cbd5e0;
}

.product-footer-hero {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 12px;
    min-height: 50px;
}

.product-price-hero {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.buy-now-btn-hero {
    background: #ff6b35;
    color: #fff;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.buy-now-btn-hero:hover {
    background: #e5562e;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.more-info-wrapper-hero {
    margin-top: 10px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-info-btn-hero {
    color: #bbb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.more-info-btn-hero:hover {
    color: #ff6b35;
    text-decoration: underline;
}

/* Responsive Design for Hero Cards */
@media (max-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 22px;
    }
    
    .product-image-hero {
        width: 160px;
        min-width: 160px;
        max-width: 160px;
    }
    
    .product-image-hero img {
        max-width: 140px;
    }
    
    .product-name-hero {
        font-size: 20px;
    }
    
    .product-price-hero {
        font-size: 28px;
    }
}

/* Tablet-specific hero card optimizations */
@media (min-width: 769px) and (max-width: 1280px) {
    .product-card-hero {
        height: auto;
        min-height: 380px;
        padding: 16px;
        gap: 16px;
    }
    
    .product-image-hero {
        width: 155px;
        min-width: 155px;
        max-width: 155px;
    }
    
    .product-image-hero img {
        max-width: 135px;
    }
    
    .product-name-hero {
        font-size: 19px;
        line-height: 1.3;
    }
    
    .product-meta-hero {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .product-info-hero {
        max-height: 70px;
        margin-bottom: 12px;
    }
    
    .product-info-hero p {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .product-price-hero {
        font-size: 28px;
    }
    
    .buy-now-btn-hero {
        padding: 13px 35px;
        font-size: 14px;
    }
    
    .more-info-btn-hero {
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    .product-card-hero {
        height: auto;
        min-height: 360px;
    }
}

/* Tablet dropdown optimizations */
@media (min-width: 769px) and (max-width: 1280px) {
    .dosage-select-hero,
    .count-select-hero {
        height: 46px;
        padding: 10px 35px 10px 14px;
        font-size: 14px;
        background-size: 14px 14px;
        background-position: right 10px center;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card-hero {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .product-image-hero {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 0;
        padding: 15px;
        background-color: #f8f9fa;
        border-radius: 10px;
    }
    
    .product-image-hero img {
        max-width: 120px;
        max-height: 120px;
    }
    
    .product-price-hero {
        font-size: 32px;
        margin-left: 15px;
    }
    
    .product-content-hero {
        padding-top: 0;
    }
    
    .product-name-hero {
        font-size: 22px;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .product-meta-hero {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .product-info-hero {
        margin-bottom: 20px;
    }
    
    .product-info-hero p {
        text-align: center;
    }
    
    .dosage-count-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .dosage-select-hero,
    .count-select-hero {
        height: 44px;
        padding: 10px 35px 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
        background-size: 14px 14px;
        background-position: right 10px center;
    }
}

@media (max-width: 480px) {
    .product-card-hero {
        margin: 0 5px;
        padding: 12px;
    }
    
    .product-image-hero {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .product-image-hero img {
        max-width: 100px;
        max-height: 100px;
    }
    
    .product-price-hero {
        font-size: 28px;
        margin-left: 0;
    }
    
    .product-name-hero {
        font-size: 20px;
    }
    
    .product-meta-hero,
    .product-info-hero p {
        font-size: 12px;
    }
    
    .dosage-count-container {
        gap: 8px;
    }
    
    .dosage-select-hero,
    .count-select-hero {
        height: 42px;
        padding: 8px 32px 8px 10px;
        font-size: 16px; /* Keep 16px to prevent iOS zoom */
        background-size: 12px 12px;
        background-position: right 8px center;
    }
    
    .buy-now-btn-hero {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .more-info-btn-hero {
        font-size: 12px;
    }
}

/* Horizontal Product Card Styles */
.product-horizontal-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.product-horizontal-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.product-image-section {
    position: relative;
    padding: 15px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}


.product-image-horizontal {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    margin: 15px 0;
}

.product-price-large {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 10px;
}

.product-details-section {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title-horizontal {
    font-size: 1.3rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-info {
    margin-bottom: 15px;
}

.product-known-as,
.product-ingredient {
    margin-bottom: 6px;
    color: #374151;
    font-size: 0.85rem;
}

.product-known-as strong,
.product-ingredient strong {
    color: #1f2937;
    font-weight: 600;
}

.product-description {
    margin-bottom: 15px;
}

.product-description p {
    color: #6b7280;
    line-height: 1.5;
    font-size: 0.8rem;
}

.product-selectors {
    margin-bottom: 15px;
}

.product-select-horizontal {
    border: 2px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.8rem;
    background: white;
    transition: all 0.3s ease;
}

.product-select-horizontal:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.buy-now-horizontal {
    background: #f59e0b;
    border: none;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.buy-now-horizontal:hover {
    background: #d97706;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.product-info-link {
    text-align: center;
}

.product-info-link a {
    color: #6b7280;
    font-size: 0.75rem;
    transition: color 0.3s ease;
}

.product-info-link a:hover {
    color: #374151;
}
#products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    margin: 0 auto;
    max-width: 1800px;
}

/* Override Bootstrap column classes inside #products */
#products > .col-lg-4,
#products > .col-md-6 {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
}

/* Products Page Layout */
.products-page {
    background-color: #fff;
    min-height: 100vh;
    padding: 40px 0;
}

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

.products-title {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.products-layout {
    display: flex;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Mobile Category Dropdown for Products Page */
.category-dropdown-mobile-products {
    display: none; /* Hidden on desktop */
    margin-bottom: 20px;
    width: 100%;
    position: relative;
}

.category-select-mobile-products {
    width: 100%;
    height: 52px;
    padding: 12px 40px 12px 16px;
    border: 2px solid #FFEDE4;
    border-radius: 12px;
    background-color: #FFEDE4;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #e09975;
    cursor: pointer;
    outline: none;
    
    /* Remove default styling */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* Custom arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23e09975' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    
    /* Text handling */
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: visible;
    
    /* Interaction */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    
    /* Touch optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.category-select-mobile-products:focus {
    border-color: #e09975;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(224, 153, 117, 0.2);
}

.category-select-mobile-products:active {
    transform: translateY(1px);
}

/* Style the dropdown options */
.category-select-mobile-products option {
    padding: 12px 16px;
    background-color: #fff;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.category-select-mobile-products option:checked,
.category-select-mobile-products option:hover {
    background-color: #FFEDE4;
    color: #e09975;
}

/* Categories Sidebar */
.categories-sidebar {
    flex: 0 0 250px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    height: fit-content;
}

.categories-sidebar h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f3f4;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-link {
    display: block;
    padding: 12px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-link:hover {
    background-color: #f8f9fa;
    color: #ff6b35;
    text-decoration: none;
}

.category-link.active {
    background-color: #ff6b35;
    color: white;
    font-weight: 600;
}

/* Products Content */
.products-content {
    flex: 1;
    min-width: 0; /* Allow flex item to shrink below content size */
}

#all-products {
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

/* Product Cards - All Products Page Specific Styles */
.products-page #all-products .col-lg-4,
.products-page #all-products .col-md-6 {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

/* Default styles for larger screens (3-column layout) */
.products-page .product-card-hero {
    height: auto;
    min-height: 365px;
    padding: 18px;
    gap: 18px;
}

.products-page .product-image-hero {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
}

.products-page .product-image-hero img {
    max-width: 145px;
    height: auto;
}

.products-page .product-price-hero {
    font-size: 26px;
    margin-top: 10px;
}

.products-page .product-content-hero {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.products-page .product-name-hero {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.products-page .product-meta-hero {
    font-size: 11px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.products-page .product-info-hero {
    margin-bottom: 15px;
    flex: 0 1 auto;
    max-height: 65px;
    overflow: hidden;
}

.products-page .product-info-hero p {
    font-size: 11px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.products-page .dosage-select-hero,
.products-page .count-select-hero {
    height: 46px;
    font-size: 12px;
    padding: 10px 35px 10px 12px;
}

.products-page .buy-now-btn-hero {
    padding: 12px 28px;
    font-size: 13px;
}

.products-page .more-info-btn-hero {
    font-size: 11px;
}

/* Adjustments for 2-column layout on medium screens */
@media (min-width: 1400px) and (max-width: 1599px) {
    .products-page .product-card-hero {
        min-height: 365px;
        padding: 20px;
        gap: 20px;
    }
    
    .products-page .product-image-hero {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
    }
    
    .products-page .product-image-hero img {
        max-width: 160px;
    }
    
    .products-page .product-price-hero {
        font-size: 28px;
        margin-top: 12px;
    }
    
    .products-page .product-name-hero {
        font-size: 20px;
    }
    
    .products-page .product-meta-hero {
        font-size: 12px;
    }
    
    .products-page .product-info-hero p {
        font-size: 12px;
    }
    
    .products-page .dosage-select-hero,
    .products-page .count-select-hero {
        height: 48px;
        font-size: 13px;
    }
    
    .products-page .buy-now-btn-hero {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .products-page .more-info-btn-hero {
        font-size: 12px;
    }
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pagination-link {
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pagination-link:hover:not(.disabled) {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
    text-decoration: none;
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-number:hover {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
    text-decoration: none;
}

.page-number.active {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

.page-dots {
    color: #999;
    font-weight: bold;
}

/* Responsive Design for Products Page */
@media (min-width: 1800px) {
    .products-layout {
        max-width: 1800px;
    }
    
    #all-products {
        grid-template-columns: repeat(3, 1fr);
        gap: 0px;
    }
}

@media (min-width: 1600px) and (max-width: 1799px) {
    #all-products {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1400px) and (max-width: 1599px) {
    #all-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1599px) {
    #products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px;
    }
}

@media (max-width: 1400px) {
    .products-layout {
        max-width: 1200px;
    }
    
    .products-page .product-card-hero {
        min-height: 380px;
    }
    
    .products-page .product-image-hero {
        width: 160px;
        min-width: 160px;
        max-width: 160px;
    }
    
    .products-page .product-image-hero img {
        max-width: 140px;
    }
    
    .products-page .product-name-hero {
        font-size: 18px;
    }
}

@media (max-width: 1200px) {
    .products-layout {
        gap: 20px;
    }
    
    .products-page .product-card-hero {
        min-height: 360px;
        padding: 15px;
        gap: 15px;
    }
    
    .products-page .product-image-hero {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
    }
    
    .products-page .product-image-hero img {
        max-width: 120px;
    }
    
    .products-page .product-price-hero {
        font-size: 24px;
    }
    
    .products-page .product-name-hero {
        font-size: 17px;
    }
    
    .products-page .product-meta-hero {
        font-size: 11px;
    }
    
    .products-page .product-info-hero p {
        font-size: 11px;
    }
}

@media (max-width: 1024px) {
    .products-layout {
        flex-direction: column;
        gap: 30px;
    }
    
    /* Show dropdown, hide sidebar on tablet */
    .category-dropdown-mobile-products {
        display: block;
    }
    
    .categories-sidebar {
        display: none;
    }
    
    #all-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    #products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
    
    /* Reset product cards to full width when sidebar is on top */
    .products-page .product-card-hero {
        height: auto;
        min-height: 395px;
        padding: 20px;
    }
    
    .products-page .product-image-hero {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
    }
    
    .products-page .product-image-hero img {
        max-width: 160px;
    }
    
    .products-page .product-price-hero {
        font-size: 28px;
    }
    
    .products-page .product-name-hero {
        font-size: 20px;
    }
    
    .products-page .product-meta-hero {
        font-size: 12px;
    }
    
    .products-page .product-info-hero p {
        font-size: 12px;
    }
    
    .products-page .dosage-select-hero,
    .products-page .count-select-hero {
        height: 46px;
        padding: 10px 35px 10px 14px;
        font-size: 14px;
        background-size: 14px 14px;
        background-position: right 10px center;
    }
}

@media (max-width: 900px) {
    #all-products {
        grid-template-columns: 1fr;
    }
    
    #products {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .products-page {
        padding: 20px 0;
    }
    
    .products-title {
        font-size: 36px;
    }
    
    .products-layout {
        gap: 20px;
        padding: 0 15px;
    }
    
    /* Show dropdown, hide sidebar on mobile */
    .category-dropdown-mobile-products {
        display: block;
        margin-bottom: 25px;
    }
    
    .categories-sidebar {
        display: none;
    }
    
    /* Product cards mobile adjustments */
    .products-page .product-card-hero {
        flex-direction: column;
        min-height: auto;
        padding: 15px;
    }
    
    .products-page .product-image-hero {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        background-color: #f8f9fa;
        border-radius: 10px;
    }
    
    .products-page .product-image-hero img {
        max-width: 120px;
        max-height: 120px;
    }
    
    .products-page .product-price-hero {
        font-size: 28px;
        margin-top: 0;
        margin-left: 15px;
    }
    
    .products-page .product-name-hero {
        font-size: 20px;
        text-align: center;
    }
    
    .products-page .product-meta-hero {
        font-size: 12px;
        text-align: center;
    }
    
    .products-page .product-info-hero p {
        font-size: 12px;
        text-align: center;
    }
    
    .products-page .dosage-count-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .products-page .dosage-select-hero,
    .products-page .count-select-hero {
        height: 44px;
        padding: 10px 35px 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
        background-size: 14px 14px;
        background-position: right 10px center;
    }
    
    .pagination {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-link {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .page-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .products-title {
        font-size: 28px;
    }
    
    .products-layout {
        padding: 0 10px;
    }
    
    /* Adjust dropdown size for small mobile */
    .category-dropdown-mobile-products {
        display: block;
        margin-bottom: 20px;
    }
    
    .category-select-mobile-products {
        height: 48px;
        font-size: 16px; /* Keep 16px to prevent iOS zoom */
        padding: 10px 38px 10px 14px;
        background-size: 18px 18px;
    }
    
    .categories-sidebar {
        display: none;
    }
    
    .products-page .product-card-hero {
        padding: 12px;
    }
    
    .products-page .product-image-hero {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .products-page .product-image-hero img {
        max-width: 100px;
        max-height: 100px;
    }
    
    .products-page .product-price-hero {
        font-size: 24px;
        margin-left: 0;
    }
    
    .products-page .product-name-hero {
        font-size: 18px;
    }
    
    .products-page .product-meta-hero {
        font-size: 11px;
    }
    
    .products-page .product-info-hero p {
        font-size: 11px;
    }
    
    .products-page .dosage-count-container {
        gap: 8px;
    }
    
    .products-page .dosage-select-hero,
    .products-page .count-select-hero {
        height: 42px;
        padding: 8px 32px 8px 10px;
        font-size: 16px; /* Prevent zoom on iOS */
        background-size: 12px 12px;
        background-position: right 8px center;
    }
    
    .products-page .buy-now-btn-hero {
        padding: 10px 25px;
        font-size: 13px;
    }
    
    .products-page .more-info-btn-hero {
        font-size: 11px;
    }
    
    .pagination-link {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .page-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .page-numbers {
        gap: 5px;
    }
}

/* Responsive adjustments for horizontal cards */
@media (max-width: 768px) {
    .product-horizontal-card .row {
        flex-direction: column;
    }
    
    .product-image-section {
        min-height: 200px;
    }
    
    .product-details-section {
        padding: 20px;
    }
    
    .product-title-horizontal {
        font-size: 1.5rem;
    }
    
    .product-price-large {
        font-size: 2rem;
    }
}
