/* Main styling for the website */

/* Variables */
:root {
    --primary-color: #3490dc;
    --secondary-color: #38c172;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --danger-color: #e3342f;
    --success-color: #38c172;
    --warning-color: #f6993f;
    --info-color: #6cb2eb;
}

/* Dark mode */
[data-theme="dark"] {
    --primary-color: #4299e1;
    --secondary-color: #48bb78;
    --dark-color: #1a202c;
    --light-color: #2d3748;
    --text-color: #e2e8f0;
    --text-muted: #a0aec0;
    --border-color: #4a5568;
    --bg-color: #1a202c;
    --card-bg: #2d3748;
}

[data-theme="dark"] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .navbar-light {
    background-color: var(--dark-color) !important;
}

[data-theme="dark"] .navbar-light .navbar-brand,
[data-theme="dark"] .navbar-light .navbar-nav .nav-link {
    color: var(--text-color);
}

/* Body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.navbar-brand img {
    max-height: 40px;
}

/* Banner */
.banner-section {
    margin-top: -16px;
}

.banner-img {
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section Title */
.section-title {
    position: relative;
    margin-bottom: 30px;
    text-align: center;
}

.section-title h2 {
    display: inline-block;
    position: relative;
    font-size: 28px;
    font-weight: 600;
    padding-bottom: 10px;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Category Card */
.category-card {
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-card a {
    color: inherit;
    text-decoration: none;
}

.category-icon {
    padding: 30px 0;
    font-size: 40px;
    color: var(--primary-color);
}

.category-card .card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 0;
}

/* Product Card */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card a {
    color: inherit;
    text-decoration: none;
}

.product-icon {
    padding: 30px 0;
    font-size: 40px;
    color: var(--primary-color);
    text-align: center;
}

.product-card .card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
    height: 40px;
    overflow: hidden;
}

.product-category {
    font-size: 14px;
    color: #6c757d;
}

.product-price {
    font-weight: bold;
    color: var(--primary-color);
}

/* Why Us Section */
.why-us-item {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

[data-theme="dark"] .why-us-item {
    background-color: var(--card-bg);
}

.why-us-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.why-us-item .icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.why-us-item h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.why-us-item p {
    font-size: 14px;
    color: #6c757d;
}

[data-theme="dark"] .why-us-item p {
    color: var(--text-muted);
}

/* Footer */
footer {
    background-color: #f8f9fa;
    padding: 40px 0;
    margin-top: 50px;
}

[data-theme="dark"] footer {
    background-color: var(--dark-color);
}

footer h5 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

footer ul {
    padding-left: 0;
}

footer ul li {
    margin-bottom: 10px;
}

footer a {
    color: #6c757d;
    text-decoration: none;
}

[data-theme="dark"] footer a {
    color: var(--text-muted);
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Checkout Page */
.checkout-container {
    margin-top: 20px;
}

.product-placeholder {
    height: 150px;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #cccccc;
    border-radius: 4px;
}

[data-theme="dark"] .product-placeholder {
    background-color: var(--border-color);
    color: var(--text-muted);
}

/* Account Page */
.account-sidebar {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
}

[data-theme="dark"] .account-sidebar {
    background-color: var(--card-bg);
}

.account-sidebar .nav-link {
    color: #333;
    padding: 8px 15px;
    border-radius: 4px;
    margin-bottom: 5px;
}

[data-theme="dark"] .account-sidebar .nav-link {
    color: var(--text-color);
}

.account-sidebar .nav-link:hover,
.account-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* Auth Forms */
.auth-container {
    max-width: 500px;
    margin: 50px auto;
}

.auth-container .card {
    border: none;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link {
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-title h2 {
        font-size: 24px;
    }
    
    .banner-img {
        height: 200px;
    }
    
    .why-us-item {
        margin-bottom: 20px;
    }
}