/* Custom CSS for Tatva Herb */

:root {
    --primary-color: #708238;
    --secondary-color: #A4B494;
    --success-color: #4A5D23;
    --light-bg: #F4F7E9;
    --dark-bg: #2C3317;
    --accent-color: #8B9E6B;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--light-bg);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/backgrounds/leaves.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color) !important;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 5rem 1rem;
    background-color: var(--light-bg);
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

/* Hero Content Styles */
.hero-content {
    position: relative;
    z-index: 2;
    color: var(--dark-bg);
    width: 100%;
    max-width: 800px;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 3.5rem;
    border-radius: 25px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(112, 130, 56, 0.3);
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(74, 93, 35, 0.2),
                inset 0 -2px 10px rgba(255, 255, 255, 0.5),
                inset 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(120deg, 
        rgba(255, 255, 255, 0.4), 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.4));
    z-index: 0;
    opacity: 0.6;
}

.hero-content:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 45px rgba(74, 93, 35, 0.25),
                inset 0 -2px 10px rgba(255, 255, 255, 0.6),
                inset 0 2px 10px rgba(0, 0, 0, 0.15);
    border-color: rgba(112, 130, 56, 0.4);
    background-color: rgba(255, 255, 255, 0.9);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--dark-bg);
    margin-bottom: 2.5rem;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-image {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    background-image: url('../images/hero-plant.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-52%) translateX(10px); }
}

@media (max-width: 991px) {
    .hero-image {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 2rem auto;
        width: 300px;
        height: 300px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        text-align: center;
    }
    
    .hero-description {
        text-align: center;
    }
    
    .hero-content {
        margin: 1rem;
        text-align: center;
        padding: 2rem;
        max-width: calc(100% - 2rem);
    }

    .hero-section {
        padding: 3rem 1rem;
        min-height: 500px;
    }
}

/* Testimonial Section */
.testimonial-section {
    position: relative;
    padding: 40px 0;
    background: var(--light-bg);
}

.testimonial-carousel {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.testimonial-container {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.testimonial-slide {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-item {
    flex: 0 0 33.333%;
    min-width: 300px;
    padding: 0 15px;
    transition: transform 0.5s ease;
}

.testimonial-item .card {
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    height: 100%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(112, 130, 56, 0.2);
    margin-bottom: 0;
}

.testimonial-item .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(74, 93, 35, 0.15);
    border-color: var(--primary-color);
}

.testimonial-rating {
    font-size: 1.2rem;
    color: #ffc107;
}

.testimonial-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.testimonial-nav-button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-nav-button:hover {
    background: var(--success-color);
    transform: scale(1.1);
}

@media (max-width: 992px) {
    .testimonial-item {
        flex: 0 0 50%;
    }
}

@media (max-width: 768px) {
    .testimonial-item {
        flex: 0 0 100%;
    }
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(112, 130, 56, 0.2);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/backgrounds/leaves.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    z-index: 0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(74, 93, 35, 0.15);
    border-color: var(--primary-color);
}

.card-img-top {
    border-radius: 15px 15px 0 0;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.card-body {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 0%, rgba(244, 247, 233, 0.95) 100%);
    border-radius: 0 0 15px 15px;
    position: relative;
    z-index: 1;
}

/* Contact Cards */
.contact-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(112, 130, 56, 0.2) !important;
    transition: all 0.3s ease;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/product.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.08;
    z-index: 0;
}

.contact-card .card-body {
    position: relative;
    z-index: 1;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(74, 93, 35, 0.15);
    border-color: var(--primary-color) !important;
}

/* Buttons */
.btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 93, 35, 0.15);
}

.btn-success:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 93, 35, 0.2);
}

.btn-outline-success {
    color: var(--success-color);
    border-color: var(--success-color);
    background-color: transparent;
}

.btn-outline-success:hover {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 93, 35, 0.2);
}

/* Product Cards */
.product-card {
    height: 100%;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
}

.product-card .card-text {
    flex-grow: 1;
}

/* Feature Boxes */
.feature-box {
    padding: 2rem 1rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

/* Footer */
footer {
    background-color: var(--dark-bg) !important;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23708238' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

footer .container {
    position: relative;
    z-index: 1;
}

footer a {
    transition: all 0.3s ease;
    position: relative;
}

footer a:hover {
    color: var(--accent-color) !important;
    transform: translateX(5px);
}

footer h5, footer h6 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

/* Cart */
.cart-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        text-align: center;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Custom Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Cart Count Badge */
#cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
}

/* Order Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -35px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #e9ecef;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #e9ecef;
}

.timeline-item.active .timeline-marker {
    background-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* Utility Classes */
.text-success {
    color: var(--success-color) !important;
}

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

.border-success {
    border-color: var(--success-color) !important;
}

/* Additional Utility Classes */
.bg-olive {
    background-color: var(--primary-color) !important;
}

.bg-olive-light {
    background-color: var(--secondary-color) !important;
}

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

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

/* Natural Decorative Elements */
.leaf-divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.leaf-divider::before {
    content: "☘️";
    font-size: 1.5rem;
    color: var(--accent-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Glass Effect Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(112, 130, 56, 0.2);
    box-shadow: 0 8px 32px 0 rgba(74, 93, 35, 0.1);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States */
.btn:focus,
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Product Gallery */
.product-gallery {
    position: relative;
}

.main-swiper {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 10px;
}

.main-swiper .swiper-slide {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.main-swiper .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumb-swiper {
    width: 100%;
    height: 100px;
    box-sizing: border-box;
    padding: 10px 0;
}

.thumb-swiper .swiper-slide {
    width: 100px;
    height: 100%;
    opacity: 0.4;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumb-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--success-color);
}

.main-swiper .swiper-button-next,
.main-swiper .swiper-button-prev {
    color: var(--success-color);
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.main-swiper .swiper-button-next:after,
.main-swiper .swiper-button-prev:after {
    font-size: 18px;
}

.main-swiper .swiper-button-next:hover,
.main-swiper .swiper-button-prev:hover {
    background: var(--success-color);
    color: white;
}

.main-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--success-color);
    opacity: 0.5;
}

.main-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--success-color);
}

@media (max-width: 768px) {
    .main-swiper .swiper-slide {
        height: 300px;
    }
    
    .thumb-swiper {
        height: 80px;
    }
    
    .thumb-swiper .swiper-slide {
        width: 80px;
    }
}

/* Dropdown Menu Styles */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(112, 130, 56, 0.1);
}

.dropdown-item {
    color: var(--dark-bg);
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--success-color);
    transform: translateX(5px);
}

.dropdown-divider {
    border-color: rgba(112, 130, 56, 0.1);
    margin: 0.5rem 0;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Make dropdown work on hover */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block;
    }
}
