/* The Health Store Styles */
* {
    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: #f8fffe;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-list a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-list a:hover {
    color: #4caf50;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    width: 300px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #4caf50;
}

.search-icon {
    position: absolute;
    right: 1rem;
    color: #666;
    cursor: pointer;
}

.cart-btn {
    position: relative;
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.cart-btn:hover {
    background: #45a049;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-primary {
    background: white;
    color: #4caf50;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Main Search */
.main-search {
    padding: 2rem 0;
    background: white;
}

.main-search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.main-search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 3px solid #4caf50;
    border-radius: 50px;
    font-size: 1.1rem;
    outline: none;
}

.main-search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4caf50;
    font-size: 1.3rem;
    cursor: pointer;
}

/* Products Section */
.products {
    padding: 4rem 0;
}

.products h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #4caf50;
    margin-bottom: 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

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

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f8fffe;
    padding: 1rem;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e8f5e8;
    color: #2d7d32;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #ffc107;
}

.rating-text {
    color: #666;
    font-size: 0.9rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4caf50;
}

.original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.add-to-cart {
    width: 100%;
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background: #45a049;
}

.add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.load-more-btn:hover {
    background: #45a049;
}

.load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Shopping Cart */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    z-index: 2001;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    color: #4caf50;
    font-size: 1.3rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8fffe;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: #4caf50;
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    background: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.25rem;
}

.remove-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

.cart-total {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.checkout-btn {
    width: 100%;
    background: #4caf50;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background: #45a049;
}

/* Product Detail Page */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 0;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '>';
    margin-left: 0.5rem;
    color: #666;
}

.breadcrumb-list a {
    color: #4caf50;
    text-decoration: none;
}

.breadcrumb-list .active {
    color: #666;
}

.product-detail {
    padding: 2rem 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
}

.product-main-img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #e8f5e8;
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
}

.product-thumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #e8f5e8;
    cursor: pointer;
    transition: border-color 0.3s;
}

.product-thumb:hover,
.product-thumb.active {
    border-color: #4caf50;
}

.product-info-detail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-title-detail {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.product-rating-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-price-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-price-detail {
    font-size: 2rem;
    font-weight: 700;
    color: #4caf50;
}

.original-price-detail {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
}

.discount-badge-detail {
    background: #e8f5e8;
    color: #2d7d32;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.product-description {
    color: #666;
    line-height: 1.8;
}

.product-features {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
}

.product-features h4 {
    color: #4caf50;
    margin-bottom: 1rem;
}

.product-features ul {
    list-style: none;
}

.product-features li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-controls button {
    background: #f0f0f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls input {
    width: 60px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 1rem;
}

.add-to-cart-detail {
    background: #4caf50;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-to-cart-detail:hover {
    background: #45a049;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #4caf50;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

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

.footer-section a:hover {
    color: #4caf50;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-wrapper {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }
    
    .logo img {
        height: 40px;
    }
    
    .nav-list {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .cart-btn {
        padding: 0.6rem;
        font-size: 1rem;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
        top: -6px;
        right: -6px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-primary {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .main-search {
        padding: 1rem 0;
    }
    
    .main-search-input {
        padding: 0.8rem 2.5rem 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .main-search-icon {
        right: 1rem;
        font-size: 1.1rem;
    }
    
    .products {
        padding: 2rem 0;
    }
    
    .products h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .product-card {
        border-radius: 10px;
    }
    
    .product-image {
        height: 150px;
        padding: 0.5rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .product-price {
        margin-bottom: 0.8rem;
    }
    
    .current-price {
        font-size: 1.2rem;
    }
    
    .add-to-cart {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-main-img {
        height: 300px;
    }
    
    .product-thumb {
        width: 60px;
        height: 60px;
    }
    
    .product-title-detail {
        font-size: 1.5rem;
    }
    
    .current-price-detail {
        font-size: 1.5rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .container {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .nav-wrapper {
        padding: 0.3rem 0;
    }
    
    .logo img {
        height: 35px;
    }
    
    .nav-list {
        gap: 0.8rem;
        font-size: 0.85rem;
    }
    
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .main-search {
        padding: 0.8rem 0;
    }
    
    .products {
        padding: 1.5rem 0;
    }
    
    .products h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.8rem;
    }
    
    .product-image {
        height: 120px;
    }
    
    .product-info {
        padding: 0.8rem;
    }
    
    .product-title {
        font-size: 0.9rem;
    }
    
    .current-price {
        font-size: 1.1rem;
    }
    
    .add-to-cart {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Loading States */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #4caf50;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message i {
    color: #28a745;
    font-size: 1.2rem;
}

/* Desktop hero and above-the-fold optimizations */
@media (min-width: 769px) {
  .hero {
    padding: 2.5rem 0 1.5rem 0;
  }
  .hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.7rem;
  }
  .hero p {
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
  }
  .btn-primary {
    padding: 0.7rem 1.7rem;
    font-size: 1.05rem;
  }
  .main-search {
    padding: 0.7rem 0 0.7rem 0;
  }
  .main-search-container {
    max-width: 500px;
  }
  .main-search-input {
    padding: 0.8rem 2.5rem 0.8rem 1.2rem;
    font-size: 1.05rem;
  }
  .main-search-icon {
    right: 1.2rem;
    font-size: 1.1rem;
  }
  .products {
    padding: 2.2rem 0 1.5rem 0;
  }
  .products h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }
  .products-grid {
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* Improved Shipping Form Overlay */
#shipping-form-modal {
  background: white;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  padding: 2.2rem 1.5rem 1.5rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
#shipping-form-modal h2 {
  margin-bottom: 1.5rem;
  color: #4caf50;
  font-size: 1.6rem;
  text-align: center;
  font-weight: 700;
}
#shipping-form-modal .form-group {
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
}
#shipping-form-modal label {
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: #333;
  font-size: 1rem;
}
#shipping-form-modal input,
#shipping-form-modal select {
  width: 100%;
  padding: 0.7rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
  margin-bottom: 0;
}
#shipping-form-modal input:focus,
#shipping-form-modal select:focus {
  outline: none;
  border-color: #4caf50;
}
#shipping-form-modal button[type="submit"] {
  width: 100%;
  background: #4caf50;
  color: white;
  border: none;
  padding: 0.9rem;
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
#shipping-form-modal button[type="submit"]:hover {
  background: #388e3c;
}
#shipping-form-modal #shipping-error {
  display: none;
  color: #b71c1c;
  background: #ffebee;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  text-align: center;
  font-weight: 500;
}
#close-shipping-form {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  transition: color 0.2s;
}
#close-shipping-form:hover {
  color: #b71c1c;
}
@media (max-width: 500px) {
  #shipping-form-modal {
    max-width: 95vw;
    padding: 1.2rem 0.5rem 1rem 0.5rem;
  }
  #shipping-form-modal h2 {
    font-size: 1.2rem;
  }
  #shipping-form-modal button[type="submit"] {
    font-size: 1rem;
    padding: 0.7rem;
  }
}

/* Product Image Zoom Effect */
.zoom-container {
    position: relative;
    /* overflow: hidden; */
    display: flex;
    align-items: center;
    justify-content: center;
}
.zoom-img {
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    cursor: zoom-in;
}
.zoom-img:hover {
    /* transform: none; */
    z-index: 2;
}

.zoom-lens {
  display: none;
  position: absolute;
  pointer-events: none;
  border: 2px solid #4caf50;
  width: 280px;
  height: 280px;
  background-repeat: no-repeat;
  background-size: 350% 350%;
  z-index: 10;
}

