/* 
  Kush Zaiqa - E-commerce Dashboard
  Custom CSS
*/

:root {
    /* Brand Colors */
    --brand-color: #576237;
    --brand-color-light: rgba(87, 98, 55, 0.1);
    --brand-color-hover: #495329;
    --sidebar-width: 250px;
    --header-height: 60px;
    --sidebar-bg: #212529;
    --content-bg: #f8f9fa;
}

/* General Styles */
body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: var(--content-bg);
    overflow-x: hidden;
}

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

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

/* Override Bootstrap Primary Color */
.btn-primary {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
}

.btn-primary:hover, 
.btn-primary:focus, 
.btn-primary:active {
    background-color: var(--brand-color-hover) !important;
    border-color: var(--brand-color-hover) !important;
}

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

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

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

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

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

/* Dashboard Layout */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-content {
    display: flex;
    flex: 1;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s ease;
    
    /* Show as fixed on desktop, position changes for mobile in media query */
}

/* On desktop, ensure main content is pushed over */
@media (min-width: 992px) {
    .main-content {
        margin-left: var(--sidebar-width);
    }
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    text-decoration: none;
}

.sidebar-brand:hover {
    color: white;
    opacity: 0.9;
}

.sidebar-menu {
    padding: 1.5rem 0;
}

.sidebar-menu-header {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
}

.nav-dashboard {
    flex-direction: column;
}

.nav-dashboard .nav-item {
    margin-bottom: 0.25rem;
}

.nav-dashboard .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
}

.nav-dashboard .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.nav-dashboard .nav-link:hover,
.nav-dashboard .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: var(--brand-color);
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--header-height);
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.content-wrapper {
    padding: 2rem;
    flex: 1;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #555;
    font-size: 1.25rem;
}

/* Animations */
.btn, .card, .nav-link, .form-control, .product-card {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

/* Urdu Font */
.urdu-font {
    font-family: 'Noto Nastaliq Urdu', serif;
    line-height: 35px
}

/* User Control in Topbar */
.user-control {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.user-control .cart-icon,
.user-control .wishlist-icon {
    position: relative;
    color: #555;
    font-size: 1.2rem;
}

.cart-count,
.wishlist-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--brand-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.wishlist-icon {
    color: #555;
}

.wishlist-icon:hover {
    color: #dc3545;
}

/* Dashboard Cards */
.dashboard-card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.dashboard-card .card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
}

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

.product-card:hover {
    transform: translateY(-10px);
}

.product-image-placeholder {
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.product-card:hover .product-image-placeholder {
    background-color: var(--brand-color-light);
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #fff;
    border-radius: 10px;
}

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

.category-icon {
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.2);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #fff;
    transform: scale(1.1) rotate(10deg);
}

/* Countdown Timer */
.countdown-timer {
    display: flex;
    gap: 10px;
}

.time-block {
    background-color: var(--brand-color);
    color: white;
    padding: 8px 10px;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.time-block span:first-child {
    font-size: 1.1rem;
    font-weight: bold;
}

.time-label {
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* Blog Cards */
.blog-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.blog-card:hover {
    transform: translateY(-10px);
}

/* Testimonials */
.testimonial-avatar {
    width: 50px;
    height: 50px;
    font-weight: bold;
}

/* Cart Page */
.quantity-control {
    display: flex;
    align-items: center;
}

/* Form Elements */
.form-control:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.25rem rgba(87, 98, 55, 0.25);
}

/* About Page */
.journey-icon-circle, 
.contact-icon-circle,
.social-icon-circle {
    width: 60px;
    height: 60px;
    transition: all 0.3s ease;
}

.social-icon-circle {
    width: 45px;
    height: 45px;
}

.journey-icon-circle:hover, 
.contact-icon-circle:hover,
.social-icon-circle:hover {
    transform: scale(1.1);
}

.team-avatar {
    width: 120px;
    height: 120px;
}

/* Journey and Team Card Styles */
.journey-card, .team-card {
    transition: all 0.4s ease;
    cursor: pointer;
    overflow: hidden;
}

.journey-card:hover, .team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.journey-card-overlay, .team-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(87, 98, 55, 0), rgba(87, 98, 55, 0.03));
    opacity: 0;
    transition: all 0.4s ease;
}

.journey-card:hover .journey-card-overlay, 
.team-card:hover .team-card-overlay {
    opacity: 1;
}

.journey-year {
    transition: all 0.3s ease;
}

.journey-card:hover .journey-year {
    transform: translateY(-5px);
}

/* Team card additional hover effects */
.team-card:hover .team-avatar {
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.transition-300 {
    transition: all 0.3s ease;
}

/* Add animation for journey and team cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.journey-card, .team-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.journey-card:nth-child(2), .team-card:nth-child(2) {
    animation-delay: 0.2s;
}

.journey-card:nth-child(3), .team-card:nth-child(3) {
    animation-delay: 0.4s;
}

/* Footer */
.dashboard-footer {
    background-color: #222;
    padding: 1.5rem;
    margin-top: auto;
    color: white;
}

.dashboard-footer .container {
    margin-left: 0;
}

/* Product Detail Page */
#selected-price {
    font-size: 1.2rem;
    color: var(--brand-color);
}

/* Checkout Page */
.fs-sm {
    font-size: 0.875rem;
}

/* Invoice Page */
@media print {
    .whatsapp-float {
        display: none !important;
    }
}

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

.product-card {
    animation: fadeIn 0.5s ease-out forwards;
}

/* List view for products */
.list-view .product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1rem;
}

.list-view .product-image-placeholder {
    width: 120px;
    height: 120px;
    margin-right: 1rem;
}

.list-view .product-card .card-body {
    text-align: left !important;
}

/* Contact page styles */
#contact-form .form-control {
    padding: 0.7rem 1rem;
}

.contact-icon-circle i,
.social-icon-circle i {
    font-size: 1.2rem;
}

/* Checkout page Styles */
.checkout-summary-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Cart badge animation */
@keyframes cartBadgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.cart-count {
    animation: cartBadgePulse 2s infinite;
}

/* Product Filter Styles */
.filter-card {
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.filter-card .card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

.filter-price:checked + label,
.filter-category:checked + label {
    color: var(--brand-color);
    font-weight: 500;
}

.view-mode {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.view-mode.active {
    background-color: var(--brand-color);
    color: white;
}

/* Hero section content */
.hero-dashboard {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Breadcrumb */
.page-breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-breadcrumb .breadcrumb {
    margin-bottom: 0;
    background-color: transparent;
    padding: 0;
}

.page-title {
    margin-bottom: 0;
    font-weight: 600;
}

/* Mobile Adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 80vw;
        max-width: 300px;
        z-index: 2000;
        transition: transform 0.3s ease;
        background: #212529;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .sidebar-header {
        flex-shrink: 0;
    }
    .sidebar-menu {
        flex: 1 1 auto;
        overflow-y: auto;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
        margin-right: 1rem;
    }
}

/* Small Mobile Adjustments */
@media (max-width: 767.98px) {
    .content-wrapper {
        padding: 1.5rem;
    }
    
    .hero-dashboard {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .sidebar-brand {
        font-size: 1.25rem;
    }
    
    .dashboard-card {
        margin-bottom: 1rem;
    }
    
    .countdown-timer {
        justify-content: center;
        margin-top: 15px;
    }
    
    .time-block {
        min-width: 40px;
        padding: 5px 8px;
    }
    
    .time-block span:first-child {
        font-size: 0.9rem;
    }
    
    .time-label {
        font-size: 0.6rem;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
}

/* Wishlist Page Styles */
.wishlist-container {
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wishlist-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

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

.wishlist-item:hover {
    background-color: #f9f9f9;
}

.wishlist-item-img {
    max-width: 100px;
    height: auto;
    border-radius: 4px;
    margin: 0 auto;
}

.wishlist-item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.wishlist-item-category {
    color: #6c757d;
    margin-bottom: 0;
}

.wishlist-item-price {
    font-weight: 600;
    color: var(--brand-color);
    font-size: 18px;
    margin-bottom: 0;
}

.empty-wishlist-message {
    text-align: center;
    padding: 30px 15px;
}

.empty-wishlist-message i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 15px;
}

.empty-wishlist-message h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.empty-wishlist-message p {
    color: #6c757d;
}

/* Review System Styles */
.review-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.review-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.review-author {
    font-weight: 600;
}

.review-date {
    color: #6c757d;
    font-size: 14px;
}

.review-rating {
    margin-bottom: 10px;
}

.review-rating i {
    color: #ffc107;
    margin-right: 3px;
}

.review-content p {
    margin-bottom: 0;
}

.average-rating {
    display: flex;
    align-items: center;
}

.average-rating-stars {
    margin-right: 10px;
}

.average-rating-stars i {
    color: #ffc107;
    margin-right: 3px;
}

.average-rating-number {
    font-size: 14px;
    color: #6c757d;
}

.no-reviews-message {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

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

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 25px;
    color: #ddd;
    padding: 0 3px;
}

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

.star-rating label.checked {
    color: #ffc107;
}

/* Notification Toast */
.toast-body {
    font-size: 14px;
}

/* Add to wishlist button on product cards */
.product-card .wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.product-card:hover .wishlist-btn {
    opacity: 1;
}

.product-card .wishlist-btn i {
    color: #aaa;
    transition: color 0.2s;
}

.product-card .wishlist-btn:hover i {
    color: #dc3545;
}

.product-card .wishlist-btn.active i {
    color: #dc3545;
}
