/* =====================================================
   PratahSankalanMart - Main Stylesheet
   ===================================================== */

:root {
    --primary: #e65100;
    --primary-dark: #bf360c;
    --secondary: #ff8f00;
    --accent: #1b5e20;
    --light-bg: #fff8f0;
    --card-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

/* Override Bootstrap Primary */
.bg-primary { background-color: var(--primary) !important; }
.btn-primary { background-color: var(--primary); border-color: var(--primary); }
.btn-primary:hover { 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); }
.text-primary { color: var(--primary) !important; }

/* General */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

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

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

/* Navbar */
.navbar-brand {
    font-size: 1.3rem;
    color: var(--primary) !important;
}

.navbar .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem !important;
}

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

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.65rem;
    padding: 2px 6px;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--card-shadow);
}

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

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-section h1 {
    font-weight: 700;
    font-size: 2.5rem;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Section Titles */
.section-title {
    font-weight: 700;
    font-size: 1.8rem;
    color: #333;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.section-title.text-start::after {
    left: 0;
    transform: none;
}

/* Category Cards */
.category-card {
    background: white;
    border-radius: 15px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    display: block;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(230,81,0,0.15);
}

.category-card .cat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    color: white;
}

.category-card h6 {
    font-weight: 600;
    color: #333;
    margin: 0;
    font-size: 0.95rem;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

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

.product-card .product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-card .product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 15px;
}

.product-card .product-img .placeholder-icon {
    font-size: 4rem;
    color: #ddd;
}

.product-card .discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc3545;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-card .product-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .product-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-category {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 8px;
}

.product-card .product-price {
    margin-top: auto;
    margin-bottom: 10px;
}

.product-card .price-sale {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.product-card .price-original {
    font-size: 0.85rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
}

.product-card .price-unit {
    font-size: 0.7rem;
    color: #999;
}

.product-card .btn-add-cart {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 0.85rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s;
}

.product-card .btn-add-cart:hover {
    background: var(--primary-dark);
}

/* Features Section */
.feature-box {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    height: 100%;
    transition: all 0.3s;
}

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

.feature-box .feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
    color: white;
}

.feature-box h5 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
}

.feature-box p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

/* Page Banner */
.page-banner {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 40px 0;
    text-align: center;
}

.page-banner h2 {
    font-weight: 700;
    margin: 0;
}

.page-banner .breadcrumb {
    justify-content: center;
    margin: 10px 0 0;
}

.page-banner .breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.page-banner .breadcrumb-item.active {
    color: white;
}

/* Cart Page */
.cart-table th {
    background: var(--light-bg);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
}

.cart-table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f5;
}

.cart-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.qty-input {
    width: 70px;
    text-align: center;
}

/* Checkout */
.checkout-form .form-control {
    border-radius: 8px;
    padding: 10px 15px;
}

.order-summary {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 25px;
}

/* Auth Pages */
.auth-card {
    max-width: 450px;
    margin: 40px auto;
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--card-shadow);
}

.auth-card h3 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 25px;
}

.auth-card .form-control {
    border-radius: 8px;
    padding: 10px 15px;
}

/* About / Contact Pages */
.about-section img {
    border-radius: 15px;
    box-shadow: var(--card-shadow);
}

.contact-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    height: 100%;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* Product Detail */
.product-detail-img {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-img img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.product-detail-img .placeholder-icon {
    font-size: 8rem;
    color: #ddd;
}

.product-detail-info h2 {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Order Success */
.order-success {
    text-align: center;
    padding: 60px 20px;
}

.order-success .success-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 3rem;
    color: white;
}

/* Sidebar Filters */
.filter-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.filter-card h6 {
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.filter-card .form-check {
    padding: 3px 0 3px 1.5em;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    .hero-section h1 {
        font-size: 1.6rem;
    }
    .hero-section p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.4rem;
    }
    .category-card .cat-icon {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    .product-card .product-img {
        height: 160px;
    }
    .auth-card {
        margin: 20px 15px;
        padding: 25px;
    }
    .cart-table .d-none-mobile {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }
    .product-card .product-img {
        height: 140px;
    }
}

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

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

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}
