/* Sticky header styles */
#stickyHeader {
    position: relative;
    z-index: 1002;
    transition: box-shadow 0.2s, background 0.2s;
}
#stickyHeader.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    animation: stickyFadeIn 0.3s;
}
@keyframes stickyFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* General Styles */
:root {
    --primary-color: #FF6600;
    --secondary-color: #333333;
    --light-color: #f8f9fa;
    --border-radius: 5px;
    --box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f8f8f8;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

.btn-orange {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}


.btn-outline-orange {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-orange:hover {
    background-color: var(--primary-color);
    color: white;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 15px;
    border-left: 4px solid var(--primary-color);
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

/* Sticky Header */
.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    animation: slideDown 0.5s ease-in-out;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

@keyframes slideDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-top {
    transition: all 0.3s ease-in-out;
}

.sticky .header-top {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.logo img {
    max-height: 60px;
    transition: all 0.3s ease-in-out;
}

.sticky .logo img {
    max-height: 50px;
}

.search-bar .form-control {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.search-bar .btn {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.hotline .phone {
    font-weight: bold;
    font-size: 1.1rem;
}

.hotline .phone a {
    color: var(--primary-color);
}

.cart-icon a {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive styles for header */
@media (max-width: 991px) {
    .header-top {
        height: 70px;
    }
    .navbar-toggler {
        border: none;
        color: var(--primary-color);
        font-size: 1.4rem;
        padding: 0;
        margin-left: 10px;
    }
    
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        z-index: 1000;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .sticky .navbar-collapse {
        top: 100%;
    }
}

@media (max-width: 767px) {
    .logo img {
        max-height: 45px;
    }
    
    .sticky .logo img {
        max-height: 40px;
    }

    /* Mobile header: center logo, hamburger left, cart right, hide other items */
    .header-top {
        position: relative; /* anchor for absolute positioned controls */
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* hide search and hotline on phones to keep header minimal */
    .search-bar,
    .hotline {
        display: none !important;
    }

    /* hamburger (4 gạch) placed at the left edge */
    .navbar-toggler {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1100;
        display: block;
        padding: 0.25rem 0.5rem;
        font-size: 1.25rem;
    }

    /* 4-line hamburger visual */
    .hamburger-4 {
        display: inline-block;
        width: 22px;
        height: 18px;
        position: relative;
    }
    .hamburger-4 span {
        display: block;
        position: absolute;
        height: 2px;
        width: 100%;
        background: var(--secondary-color);
        left: 0;
        transition: all 0.2s ease;
        border-radius: 2px;
    }
    .hamburger-4 span:nth-child(1) { top: 0px; }
    .hamburger-4 span:nth-child(2) { top: 5px; }
    .hamburger-4 span:nth-child(3) { top: 10px; }
    .hamburger-4 span:nth-child(4) { top: 15px; }

    .navbar-toggler:focus .hamburger-4 span,
    .navbar-toggler:hover .hamburger-4 span {
        background: var(--primary-color);
    }

    /* logo centered in the header */
    .header-top .logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        z-index: 1050;
    }

    /* cart icon placed at the right edge */
    .cart-icon {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1050;
    }

    /* reduce side padding between the column grid on very small screens */
    .header-top .row > [class*='col-'] {
        padding-left: 0;
        padding-right: 0;
    }

    /* ensure the collapsed navbar appears below the header and spans full width */
    .navbar-collapse {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        width: 100%;
    }
}

/* Main Menu */
.main-menu {
    background-color: var(--primary-color);
}

.navbar-dark .navbar-nav .nav-link {
    color: white;
    padding: 10px 15px;
    font-weight: 500;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

/* Banner Slider */
.slider-banner {
    padding: 20px 0;
}

.banner-item {
    position: relative;
    overflow: hidden;
    height: 500px; /* Fixed height for all banners */
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This ensures images cover the container while maintaining aspect ratio */
    object-position: center; /* Centers the image */
}

.banner-slider .slick-slide {
    padding: 0;
}

.banner-slider .slick-prev,
.banner-slider .slick-next {
    z-index: 1;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.banner-slider .slick-prev:before,
.banner-slider .slick-next:before {
    font-size: 20px;
}

.banner-slider .slick-prev:hover,
.banner-slider .slick-next:hover {
    background: var(--primary-color);
}

.banner-slider .slick-prev {
    left: 10px;
}

.banner-slider .slick-next {
    right: 10px;
}

/* Features Section */
.feature-box {
    padding: 15px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: 100%;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.5rem;
}

.feature-text h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

/* Product Card */
.product-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e74c3c;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--border-radius);
    z-index: 1;
}

.product-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--border-radius);
    z-index: 1;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    margin-bottom: 10px;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-right: 8px;
}

.current-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.product-actions {
    display: flex;
    justify-content: center;
}

/* News Card */
.news-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.news-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.news-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-info {
    padding: 15px;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    height: 52px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-date {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 10px;
}

.news-summary {
    font-size: 0.9rem;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
}

footer h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

footer h4:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu li a {
    color: #ccc;
}

.footer-menu li a:hover {
    color: white;
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    width: 20px;
    margin-right: 10px;
    margin-top: 5px;
}

.footer-contact a {
    color: #ccc;
}

.footer-contact a:hover {
    color: white;
}

.footer-social {
    margin-top: 20px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: var(--primary-color);
}

.newsletter-form .form-control {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.newsletter-form .btn {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.footer-bottom {
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary-color);
}

/* Product Detail Page */
.product-detail {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
}

.product-gallery {
    position: relative;
}

.product-thumbs {
    margin-top: 15px;
}

.product-thumb {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.product-thumb.active {
    border-color: var(--primary-color);
}

.product-detail-info h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.product-detail-price {
    margin: 20px 0;
}

.product-detail-price .old-price {
    font-size: 1.2rem;
}

.product-detail-price .current-price {
    font-size: 1.8rem;
}

.product-detail-meta {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.product-detail-meta p {
    margin-bottom: 5px;
}

.product-quantity {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.product-quantity label {
    margin-right: 15px;
    margin-bottom: 0;
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.quantity-input button {
    width: 40px;
    height: 40px;
    background-color: #f8f9fa;
    border: none;
    font-size: 1.2rem;
}

.quantity-input input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.product-actions-detail {
    display: flex;
}

.product-actions-detail .btn {
    margin-right: 10px;
    padding: 10px 20px;
}

.product-description {
    margin-top: 30px;
}

.product-description .nav-tabs {
    border-bottom: 2px solid #eee;
}

.product-description .nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 20px;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: -2px;
}

.product-description .nav-tabs .nav-link.active {
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.product-description .tab-content {
    padding: 20px 0;
}

/* Cart Page */
.cart-table {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.cart-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.cart-product {
    display: flex;
    align-items: center;
}

.cart-product-image {
    width: 80px;
    height: 80px;
    margin-right: 15px;
}

.cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.cart-product-name {
    font-weight: 600;
}

.cart-quantity {
    width: 120px;
}

.cart-summary {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
}

.cart-summary h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.cart-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cart-summary-total {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .product-detail-info {
        margin-top: 30px;
    }
}

@media (max-width: 767px) {
    .hotline {
        display: none;
    }
    
    .cart-icon {
        margin-left: auto;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .feature-box {
        margin-bottom: 15px;
    }
}

@media (max-width: 575px) {
    .header-top .logo {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .search-bar {
        margin-bottom: 15px;
    }
    
    .cart-icon {
        position: absolute;
        right: 15px;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cart-actions .btn {
        margin-bottom: 10px;
    }
}
