/*
Theme Name: AllChemists
Theme URI: https://allchemists.co.uk/
Description: Custom AllChemists standalone theme for the AllChemists multi-vendor pharmacy marketplace. Fully compatible with WooCommerce and Dokan. No parent theme required.
Author: AllChemists Team
Author URI: https://allchemists.co.uk/
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: allchemists
Tags: woocommerce, dokan, multi-vendor, pharmacy, health, e-commerce
*/

/* ==========================================================================
   Theme Variables
   ========================================================================== */
:root {
    --primary-color: #4dc42a;
    --secondary-color: #8e1627;
    --dark-color: #0e3175;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #e2e2e2;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

/* ==========================================================================
   Global Styles
   ========================================================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

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

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 16px;
    color: #666;
}

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

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.site-branding img {
    max-height: 60px;
    width: auto;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0 15px;
}

.main-navigation a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    transition: var(--transition);
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.header-group-action {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-account,
.header-wishlist,
.header-cart {
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.header-account:hover,
.header-wishlist:hover,
.header-cart:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('assets/images/hero-pattern.png') repeat;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 550px;
    margin: 0;
    text-align: left;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.hero-search input {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #3da821;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(77, 196, 42, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark-color);
}

/* ==========================================================================
   Product Sections
   ========================================================================== */
.products-section {
    padding: 60px 0;
    background: var(--white);
}

.products-section:nth-child(even) {
    background: var(--light-bg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: var(--transition);
    position: relative;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    background: var(--light-bg);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.product-badge.new {
    background: var(--primary-color);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-price del {
    font-size: 16px;
    color: #999;
    margin-left: 10px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background: #3da821;
}

/* View All Button */
.view-all-container {
    text-align: center;
    margin-top: 40px;
}

.btn-view-all {
    padding: 12px 40px;
    background: var(--dark-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.btn-view-all:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features-section {
    padding: 60px 0;
    background: var(--light-bg);
}

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

.feature-card {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: 10px;
    transition: var(--transition);
}

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

.feature-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */
.testimonials-section {
    padding: 80px 0;
    background: var(--white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 60px;
    color: var(--primary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.testimonial-content {
    position: relative;
    z-index: 2;
}

.testimonial-text {
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.8;
}

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

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 20px;
}

.author-info h4 {
    margin: 0;
    font-size: 16px;
    color: var(--dark-color);
}

.author-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.testimonial-rating {
    color: #ffc107;
    margin-top: 5px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-widget h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-widget a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-about p {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

.footer-payment-methods {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.payment-icon {
    height: 30px;
    opacity: 0.7;
    transition: var(--transition);
}

.payment-icon:hover {
    opacity: 1;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .header-main {
        flex-wrap: wrap;
    }
    
    .main-navigation {
        order: 3;
        width: 100%;
    }
    
    .main-navigation ul {
        flex-direction: column;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.py-60 {
    padding: 60px 0;
}

/* ==========================================================================
   WooCommerce Base Resets (standalone — no parent theme needed)
   ========================================================================== */
.woocommerce-page .entry-content,
.woocommerce .entry-content {
    max-width: 100%;
}

.woocommerce ul.products {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.woocommerce ul.products li.product {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s;
    border: 1px solid #e2e2e2;
    padding: 0;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-color: #4dc42a;
}

.woocommerce ul.products li.product a img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px;
    font-weight: 600;
    padding: 15px 15px 5px;
    color: #333;
}

.woocommerce ul.products li.product .price {
    color: #4dc42a;
    font-weight: 700;
    font-size: 18px;
    padding: 0 15px 10px;
    display: block;
}

.woocommerce ul.products li.product .button {
    margin: 0 15px 15px;
    width: calc(100% - 30px);
    display: block;
    text-align: center;
    background: #0e3175;
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.woocommerce ul.products li.product .button:hover {
    background: #4dc42a;
}

.woocommerce .woocommerce-ordering,
.woocommerce .woocommerce-result-count {
    margin-bottom: 20px;
}

.woocommerce nav.woocommerce-pagination ul {
    display: flex;
    list-style: none;
    gap: 8px;
    justify-content: center;
    margin-top: 40px;
    padding: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid #e2e2e2;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
    background: #4dc42a;
    color: #fff;
    border-color: #4dc42a;
}

/* Single product */
.woocommerce div.product {
   /*  display: grid;
   grid-template-columns: 1fr 1fr;*/
    gap: 40px;
    padding: 40px 0;
}

.woocommerce div.product .woocommerce-product-gallery {
    position: relative;
}

.woocommerce div.product .summary {
    padding: 0;
}

.woocommerce div.product .summary .price {
    font-size: 28px;
    font-weight: 700;
    color: #4dc42a;
    margin-bottom: 20px;
}

.woocommerce div.product .summary .single_add_to_cart_button {
    background: #4dc42a;
    color: #fff;
    border: none;
    padding: 14px 35px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.woocommerce div.product .summary .single_add_to_cart_button:hover {
    background: #3da821;
    transform: translateY(-2px);
}

/* Cart & Checkout */
.woocommerce table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
    padding: 15px;
    border-bottom: 1px solid #e2e2e2;
    text-align: left;
}

.woocommerce table.shop_table th {
    background: #f8f9fa;
    font-weight: 700;
    color: #0e3175;
}

.woocommerce .cart-collaterals .cart_totals {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.woocommerce-message {
    background: #f0fff0;
    border-color: #4dc42a;
    color: #2d7a1a;
}

.woocommerce-info {
    background: #f0f4ff;
    border-color: #0e3175;
    color: #0e3175;
}

.woocommerce-error {
    background: #fff0f0;
    border-color: #8e1627;
    color: #8e1627;
    list-style: none;
    padding-left: 20px;
}

@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .woocommerce div.product {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}
