/* Iqra Organic Store Custom Styles */

:root {
    --primary-color: #2A6A6A;
    --secondary-color: #6B3E26;
    --accent-color: #E8A838;
    --text-dark: #333333;
    --text-light: #6B3E26;
    --bg-light: #F5E7C9;
    --bg-main: #F5E7C9;
    --border-color: #D4B28C;
    --success-color: #8B4513;
    --warning-color: #D4B28C;
    --danger-color: #dc3545;
    --white: #ffffff;
    --dark: #333333;
    --light-gray: #F5E7C9;
    --medium-gray: #6B3E26;
    --cream: #F5E7C9;
    --off-white: #F5F5F5;
    --brown-light: #D4B28C;
    --brown-medium: #8B4513;
    --brown-dark: #654321;
}

/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-main);
}

/* Logo Styling */
.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.hero-section img {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    transition: all 0.3s ease;
}

.hero-section img:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.3));
}

/* Navigation */
.navbar {
    background: var(--white) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

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

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    padding: 12px 24px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(42, 106, 106, 0.3);
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

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

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

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(139, 69, 19, 0.3) 0%, 
        rgba(212, 178, 140, 0.4) 25%, 
        rgba(107, 62, 38, 0.3) 50%, 
        rgba(212, 178, 140, 0.4) 75%, 
        rgba(139, 69, 19, 0.3) 100%);
    background-size: 200% 200%;
    animation: simpleGradientMove 4s ease infinite;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.card:hover::before {
    opacity: 0.6;
}

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

.card > * {
    position: relative;
    z-index: 2;
}

@keyframes simpleGradientMove {
    0% {
        background-position: 0% 0%;
        transform: scale(1);
    }
    25% {
        background-position: 100% 0%;
        transform: scale(1.02);
    }
    50% {
        background-position: 100% 100%;
        transform: scale(1);
    }
    75% {
        background-position: 0% 100%;
        transform: scale(1.02);
    }
    100% {
        background-position: 0% 0%;
        transform: scale(1);
    }
}

/* Fallback animation for older browsers */
@keyframes colorPulse {
    0% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0.4;
    }
}

/* Simple test animation - always visible */
.card {
    animation: cardGlow 2s ease infinite;
}

@keyframes cardGlow {
    0% {
        box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(212, 178, 140, 0.3);
    }
    100% {
        box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
    }
}

/* Product Cards */
.product-card {
    position: relative;
    overflow: hidden;
    animation: productBorderGlow 3s ease infinite;
}

@keyframes productBorderGlow {
    0% {
        border: 1px solid rgba(139, 69, 19, 0.2);
    }
    50% {
        border: 1px solid rgba(212, 178, 140, 0.6);
    }
    100% {
        border: 1px solid rgba(139, 69, 19, 0.2);
    }
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(139, 69, 19, 0.1) 0%, 
        rgba(212, 178, 140, 0.15) 25%, 
        rgba(107, 62, 38, 0.1) 50%, 
        rgba(212, 178, 140, 0.15) 75%, 
        rgba(139, 69, 19, 0.1) 100%);
    background-size: 400% 400%;
    animation: productGradientShift 8s ease infinite;
    opacity: 0.4;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.product-card:hover::after {
    opacity: 0.7;
}

.product-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

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

.product-card .card-body {
    position: relative;
    z-index: 2;
}

@keyframes productGradientShift {
    0% {
        background-position: 0% 0%;
    }
    25% {
        background-position: 100% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

/* Badges */
.badge {
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #8B4513 0%, #D4B28C 50%, #6B3E26 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Glass Morphism Hero Buttons */
.hero-section .btn {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="wheat" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1.5" fill="white" opacity="0.15"/><circle cx="80" cy="80" r="1.5" fill="white" opacity="0.15"/><circle cx="50" cy="15" r="1" fill="white" opacity="0.1"/><circle cx="15" cy="70" r="1" fill="white" opacity="0.1"/><circle cx="85" cy="35" r="1" fill="white" opacity="0.1"/><circle cx="35" cy="85" r="1" fill="white" opacity="0.1"/><circle cx="65" cy="25" r="0.8" fill="white" opacity="0.08"/><circle cx="25" cy="55" r="0.8" fill="white" opacity="0.08"/><circle cx="75" cy="65" r="0.8" fill="white" opacity="0.08"/></pattern></defs><rect width="100" height="100" fill="url(%23wheat)"/></svg>');
    opacity: 0.4;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-section p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

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

.footer a:hover {
    color: var(--accent-color);
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Price Styling */
.price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.old-price {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--danger-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

/* Category Cards */
.category-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    animation: categoryPulse 2.5s ease infinite;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: var(--accent-color);
    text-decoration: none;
    color: inherit;
}

@keyframes categoryPulse {
    0% {
        background-color: rgba(255, 255, 255, 1);
    }
    50% {
        background-color: rgba(245, 231, 201, 0.8);
    }
    100% {
        background-color: rgba(255, 255, 255, 1);
    }
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(139, 69, 19, 0.12) 0%, 
        rgba(212, 178, 140, 0.18) 25%, 
        rgba(107, 62, 38, 0.12) 50%, 
        rgba(212, 178, 140, 0.18) 75%, 
        rgba(139, 69, 19, 0.12) 100%);
    background-size: 200% 200%;
    animation: categoryGradientShift 4s ease infinite;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.category-card:hover::before {
    opacity: 0.8;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: var(--accent-color);
}

.category-card > * {
    position: relative;
    z-index: 2;
}

@keyframes categoryGradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.category-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.category-icon img {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.category-card:hover .category-icon img {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* Search Form */
.search-form {
    position: relative;
}

.search-form .form-control {
    border-radius: 25px;
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(107, 76, 76, 0.25);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, #F5E7C9 0%, #D4B28C 100%);
    color: #6B3E26;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #F5E7C9 0%, #D4B28C 100%);
    color: #6B3E26;
}

.alert-info {
    background: linear-gradient(135deg, #F5E7C9 0%, #D4B28C 100%);
    color: #6B3E26;
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Form Controls */
.form-control {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
}

/* Product Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.overlay-buttons {
    display: flex;
    gap: 10px;
}

.overlay-buttons .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rating */
.rating {
    font-size: 0.9rem;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Product Item */
.product-item {
    transition: all 0.3s ease;
}

.product-item.hidden {
    display: none;
}

.list-view .product-item {
    flex: 0 0 100%;
    max-width: 100%;
}

.list-view .product-card {
    flex-direction: row;
}

.list-view .card-img-top {
    width: 200px;
    height: 150px;
    object-fit: cover;
}

.list-view .card-body {
    flex: 1;
}