/* Main CSS Styles */
:root {
    --primary: #198754;
    --secondary: #6c757d;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    --light: #f8f9fa;
    --dark: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #198754, #146c43) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #198754, #146c43);
    color: white;
    padding: 80px 0 60px;
    margin-bottom: 0;
}

.page-header h1 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

/* Cart Items */
.cart-item {
    border: 1px solid #e9ecef;
    transition: box-shadow 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

/* Summary Card */
.summary-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
}

/* Section Titles */
.section-title {
    color: #198754;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #198754;
    border-radius: 2px;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #198754, #146c43);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #146c43, #0d552f);
    transform: translateY(-2px);
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Service Cards */
.service-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #198754, #146c43);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

/* Contact Info Cards */
.contact-info-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: #198754;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

/* Footer - merged & fixed */
footer {
    background: #198754;             /* primary green */
    background: linear-gradient(180deg, #198754 0%, #146c43 100%); /* subtle gradient */
    color: #ffffff;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
    line-height: 1.6;
}

/* Footer inner styles */
footer h5 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

footer p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 0;
}

/* Footer links: default light, hover -> white */
.footer-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.15s ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: #ffffff;
    transform: translateX(4px);
    text-decoration: none;
}

/* Make sure the small contact list icons are visible */
footer .fas,
footer .far,
footer .fa {
    color: rgba(255,255,255,0.95);
    margin-right: 8px;
}

/* Footer HR: subtle, blend with footer */
footer hr {
    border: 0;
    height: 1px;
    background: rgba(255,255,255,0.12);
    margin: 1.5rem 0;
}

/* Footer bottom row */
footer .text-md-end a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer .text-md-end a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Small screens: stack & center */
@media (max-width: 767.98px) {
    footer {
        text-align: center;
    }
    footer .text-md-end {
        margin-top: 1rem;
    }
}

/* Price Tag */
.price-tag {
    color: #198754;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 60px 0 40px;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .summary-card {
        position: static;
        margin-top: 2rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #198754;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* ------------------------------
   CART PAGE LAYOUT FIXES
   ------------------------------ */

/* Force Cart row columns to align from top */
.row.align-items-start {
    align-items: flex-start !important;
}

/* Style and fix Order Summary card alignment */
.summary-card {
    position: -webkit-sticky;
    position: sticky;
    top: 110px; /* Adjust if header is different */
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    margin-top: 0 !important;
}

/* Improve section title spacing inside summary card */
.summary-card .section-title {
    margin-top: 0 !important;
}

/* Cleaner divider */
.summary-card hr {
    margin: 1rem 0;
    border-color: rgba(0, 0, 0, 0.08);
}

/* Mobile responsive rules */
@media (max-width: 992px) {
    .summary-card {
        position: static !important;
        top: auto !important;
        margin-top: 20px !important;
    }
}
/* admin sidebar */
.sidebar {
    width: 240px;
    min-width: 200px;
    max-width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1020;
}

.sidebar .nav-link {
    color: #333;
    padding: 10px 12px;
    border-radius: 6px;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background: linear-gradient(90deg, #198754, #146c43);
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sidebar .sidebar-brand {
    border-bottom: 1px solid #eee;
}

.sidebar .sidebar-footer { font-size: .85rem; color: #666; }

/* push page content right when sidebar present */
.admin-main {
    margin-left: 240px;
    padding: 20px;
}

/* responsive collapse for small screens */
@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        transform: translateX(-110%);
        transition: transform .25s ease;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
    .sidebar-toggle-btn {
        display: inline-block;
    }
}

