/* Global Styles */
:root {
    /* Colors */
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;

    /* Typography */
    --font-family: 'Roboto', sans-serif;
    --heading-color: #333;
    --text-color: #666;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Border */
    --border-radius: 0.25rem;
    --border-color: #dee2e6;
}

/* Global Styles */
body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading-color);
    margin-bottom: var(--spacing-md);
}

/* Header */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.search-box input {
    border-radius: 20px;
    padding-left: var(--spacing-lg);
}

/* Slideshow */
.carousel-item img {
    height: 500px;
    object-fit: cover;
}

/* Featured Products */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: var(--spacing-lg);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-card img {
    height: 200px;
    object-fit: contain;
    padding: var(--spacing-md);
}

.product-card .card-body {
    padding: var(--spacing-md);
}

.product-price {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: bold;
}

.product-card .btn {
    width: 100%;
    margin-top: var(--spacing-sm);
}

/* Categories */
.category-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card img {
    height: 200px;
    object-fit: cover;
}

.category-card .card-body {
    text-align: center;
    background: var(--light-color);
}

/* Footer */
footer {
    margin-top: var(--spacing-xl);
}

.social-links a {
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-item img {
        height: 300px;
    }

    .product-card img {
        height: 150px;
    }

    .category-card img {
        height: 150px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Cart Badge */
.cart-count {
    font-size: 0.7rem;
}

/* Product Details */
.product-gallery {
    margin-bottom: var(--spacing-lg);
}

.product-gallery img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.product-info h1 {
    margin-bottom: var(--spacing-md);
}

.product-options {
    margin: var(--spacing-lg) 0;
}

.color-option,
.storage-option {
    display: inline-block;
    margin-right: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.color-option input[type='radio'],
.storage-option input[type='radio'] {
    display: none;
}

.color-option label,
.storage-option label {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-option input[type='radio']:checked + label,
.storage-option input[type='radio']:checked + label {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Cart Page */
.cart-item {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.quantity-control button {
    padding: 0 var(--spacing-sm);
}

.cart-summary {
    background: var(--light-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: darken(var(--primary-color), 10%);
    border-color: darken(var(--primary-color), 10%);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.toast {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.homeTop {
    margin-top: 0;
    height: 400px;
    max-width: 100%;
    background-image: url(/assets/images/logoImage/homeTop.jpg);
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 60px 0 0 70px;
    color: #f5f5f4;
    position: relative;
}

.title1 {
    margin-top: 0;
    font-size: 48px;
    font-weight: bold;
    color: #f5f5f4;
    animation: rise 1.5s ease-out forwards;
}

.title2 {
    font-size: 2rem;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.viewProducts {
    margin-top: 40px;
    border-radius: 20px;
    padding: 18px 36px;
    font-size: 22px;
    background-color: #c9dcc9;
    border: none;
    color: #222;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background 0.2s;
}
.viewProducts:hover {
    background-color: #b2cbb2;
}

@media (max-width: 768px) {
    .homeTop {
        height: 250px;
        padding: 30px 0 0 20px;
    }
    .title1 {
        font-size: 28px;
    }
    .title2 {
        font-size: 1.1rem;
    }
    .viewProducts {
        font-size: 16px;
        padding: 10px 20px;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .card {
        flex: 1 1 calc(33.333% - 20px);
    }
}

@media (max-width: 768px) {
    .card {
        flex: 1 1 calc(50% - 20px);
    }

    .sidebarHome {
        display: none;
        /* Hide sidebar on smaller screens */
    }
}

@media (max-width: 480px) {
    .card {
        flex: 1 1 100%;
    }

    .pagination button {
        padding: 6px 12px;
        margin: 0 2px;
    }
}

/* --- Product Card Vertical Custom --- */
.product-card-vertical {
    width: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 8px;
    margin: 0 auto;
}
.product-img {
    width: 100%;
    border-radius: 8px;
    background: #f7f7f7;
}
.product-info {
    margin-top: 8px;
    padding: 0;
}
.product-name {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 6px;
}
.product-capacity {
    margin-bottom: 10px;
}
.capacity-btn {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 8px;
    padding: 4px 12px;
    margin-right: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 0.95rem;
}
.capacity-btn.active,
.capacity-btn:first-child {
    border: 2px solid #1976d2;
    color: #1976d2;
    font-weight: bold;
}
.product-price-block {
    margin: 10px 0;
}
.product-sale-label {
    color: #e53935;
    font-weight: bold;
    display: block;
}
.product-price {
    color: #e53935;
    font-size: 1.1rem;
    font-weight: bold;
    margin-right: 8px;
}
.product-old-price {
    text-decoration: line-through;
    color: #888;
    margin-right: 8px;
}
.product-discount {
    color: #e53935;
    font-size: 0.95rem;
}
.product-gift {
    color: #1976d2;
    margin-bottom: 8px;
}
.spec-list {
    background: #f5f7fa;
    border-radius: 8px;
    padding: 7px 10px;
    margin-top: 8px;
    font-size: 0.93rem;
    color: #333;
}
.spec-list li {
    margin-bottom: 4px;
    list-style: disc inside;
}
