/* ====================================
   Coresons Ayurveda - Main Stylesheet
   Ayurvedic Green Theme
   ==================================== */

:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #43A047;
    --secondary: #8D6E63;
    --accent: #FFA726;
    --success: #43A047;
    --warning: #FFA726;
    --danger: #E53935;
    --info: #29B6F6;
    --light: #F5F5F5;
    --dark: #212121;
    --gray: #757575;
    --body-bg: #FAFAFA;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--body-bg);
    color: var(--dark);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Bootstrap Overrides */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-primary-dark {
    background-color: var(--primary-dark) !important;
}

.text-primary {
    color: var(--primary) !important;
}

/* Top Bar */
.top-bar {
    font-size: 0.85rem;
}

/* Header */
.header {
    z-index: 1030;
}

.navbar-brand img {
    max-height: 50px;
}

.cart-count {
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
}

.category-nav .nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.category-nav .nav-link:hover {
    color: var(--primary) !important;
}

/* Hero Slider */
.hero-slider {
    margin-top: -1px;
}

.hero-slide {
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-slide.hero-default {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero-slide {
        height: 350px;
    }
    .hero-title {
        font-size: 2rem;
    }
}

/* Features */
.feature-box {
    padding: 15px;
}

.feature-box i {
    display: block;
}

/* Section Headers */
.section-title {
    font-weight: 600;
    color: var(--dark);
    position: relative;
}

/* Category Cards */
.category-card {
    display: block;
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.category-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--light);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
}

.category-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 2;
}

.badge-sale {
    background: var(--danger);
}

.badge-featured {
    background: var(--accent);
    top: auto;
    bottom: 10px;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.product-info {
    padding: 15px;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.product-category a {
    color: var(--gray);
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-title a {
    color: var(--dark);
}

.product-title a:hover {
    color: var(--primary);
}

.product-rating {
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.rating-count {
    color: var(--gray);
    font-size: 0.8rem;
    margin-left: 5px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.original-price {
    font-size: 0.9rem;
    color: var(--gray);
    text-decoration: line-through;
}

.btn-add-cart {
    border-radius: 8px;
}

/* Product Detail */
.product-gallery .main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-thumbs .thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.gallery-thumbs .thumb.active,
.gallery-thumbs .thumb:hover {
    border-color: var(--primary);
}

.gallery-thumbs .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.variation-btn {
    min-width: 80px;
}

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

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

.quantity-selector input {
    width: 60px;
    text-align: center;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
}

.quantity-selector button {
    border-radius: 0;
}

.quantity-selector button:first-child {
    border-radius: 6px 0 0 6px;
}

.quantity-selector button:last-child {
    border-radius: 0 6px 6px 0;
}

/* Star Rating Input */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ddd;
    transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #FFC107;
}

/* Testimonials */
.testimonial-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.testimonial-text {
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
}

.testimonial-author strong {
    display: block;
}

/* Cart */
.cart-item-image {
    border-radius: 8px;
}

.quantity-selector-sm input {
    width: 40px;
    padding: 2px;
}

/* Auth Pages */
.auth-card {
    border: none;
    border-radius: 16px;
}

/* Footer */
.footer h5, .footer h6 {
    font-weight: 600;
}

.footer a:hover {
    color: var(--primary) !important;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.3s;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    color: white;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: opacity 0.3s;
}

.back-to-top.show {
    display: flex;
}

/* Ayurveda Banner */
.ayurveda-banner {
    background: linear-gradient(to right, #f8f9fa 50%, #e8f5e9 50%);
}

/* Newsletter CTA */
.newsletter-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Responsive */
@media (max-width: 991px) {
    .category-nav {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .product-card {
        margin-bottom: 15px;
    }
    
    .product-title {
        font-size: 0.85rem;
    }
    
    .current-price {
        font-size: 1rem;
    }
}

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

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

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

/* Breadcrumb */
.breadcrumb-nav {
    font-size: 0.85rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}
