.about-img img {
    border-radius: 10px !important;
    transition: transform 0.3s ease;
}

.about-img img:hover {
    cursor: pointer;
    transform: scale(1.02);
}

.counter-box {
    color: whitesmoke;
    border-radius: 15px !important;
    padding-top: 20px;
    height: 100px;
    background-color: #1da1f2;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: transform 0.3s ease;
}
.counter-box:hover{
    color: rgba(236, 236, 236, 0.77);
    cursor: pointer;
    transform: scale(1.05);
}
/* ================= Dark Mode ================= */
body.dark-mode {
    background-color: #121212;
    color: #f0f0f0;
}
body.dark-mode {
    background-color: #121212;
    color: #f0f0f0;
}

/* About image tweak for dark mode */
body.dark-mode .about-img img {
    border: 2px solid #333;
}

/* Counter box in dark mode */
body.dark-mode .counter-box {
    background-color: #1e1e1e;
    color: #f0f0f0;
}

body.dark-mode .counter-box:hover {
    background-color: #2a2a2a;
    color: rgba(236, 236, 236, 0.9);
}

body.dark-mode .navbar {
    background-color: #1f1f1f !important;
}
/* Default dark mode link colors */
body.dark-mode .navbar .nav-link,
body.dark-mode .navbar .navbar-brand,
body.dark-mode .dropdown-item {
    color: #f0f0f0 !important;
}
/* Dark mode active navbar link */
body.dark-mode .navbar .nav-item.active .nav-link {
    color: #a7a7a7 !important;
}
/* Dark mode active dropdown item */
body.dark-mode .dropdown-item.active {
    color: #a7a7a7 !important;
}
/* Hover effect in dark mode */
body.dark-mode .navbar .nav-link:hover,
body.dark-mode .dropdown-item:hover {
    color: #a7a7a7 !important;
}
body.dark-mode footer {
    background-color: #1f1f1f;
    color: #f0f0f0;
}
body.dark-mode footer a {
    color: #f0f0f0 !important;
}
body.dark-mode .card {
    background-color: #1e1e1e;
    color: #f0f0f0;
}
body.dark-mode .btn-primary {
    background-color: #3a3a3a;
    border-color: #555;
}
body.dark-mode .btn-gradient {
    background: rgba(30, 144, 255, 0.6);
    box-shadow: 0 4px 12px rgba(102, 171, 255, 0.3);
}
body.dark-mode .table {
    color: #f0f0f0;
}
body.dark-mode .table th,
body.dark-mode .table thead {
    background-color: #2a2a2a;
    color: #f0f0f0;
}
body.dark-mode .table tbody tr {
    background-color: #1e1e1e;
}
body.dark-mode .table tbody tr:hover {
    background-color: #333333;
    color: whitesmoke;
}
body.dark-mode .btn-outline-secondary {
    color: #f0f0f0;
    border-color: #555;
}
body.dark-mode .btn-outline-secondary:hover {
    background-color: #3a3a3a;
    color: #fff;
    border-color: #777;
}
body.dark-mode .form-control {
    background-color: #2a2a2a;
    color: #f0f0f0;
    border: 1px solid #555;
}
body.dark-mode .form-control:focus {
    background-color: #2a2a2a;
    color: #f0f0f0;
    border-color: #888;
}
body.dark-mode .navbar .dropdown-menu {
    background-color: #2a2a2a;
}
body.dark-mode .navbar .dropdown-item {
    color: #f0f0f0;
}
body.dark-mode .navbar .dropdown-item:hover,
body.dark-mode .navbar .dropdown-item.active {
    background-color: #3a3a3a;
    color: #ffffff;
}
body.dark-mode #toastContainer .toast {
    background-color: #2a2a2a;
    color: #f0f0f0;
    border: 1px solid #555;
}
.btn-custom{
    color: whitesmoke;
    border-radius: 25px;
    background-color: #0081ff;
}
/* ================= Smooth Transitions ================= */
body,
.navbar,
footer,
.card,
.btn,
.btn-gradient,
.btn-custom,
.contact-form,
.form-control,
.map-container,
.product-title,
.product-description,
.dropdown-menu,
.dropdown-item,
.table,
.toast {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.form-control{
    border-radius: 25px !important;
}
/* Checkout dark mode */
body.dark-mode {
    background-color: #121212;
    color: #f1f1f1;
}
body.dark-mode .navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

body.dark-mode .card-footer{
    background-color: #2c2c2c !important;
}
body.dark-mode .btn-add-cart{
    color: whitesmoke;
    border-radius: 25px;
    background-color: #2c2c2c;
}
body.dark-mode .btn-add-cart:hover{
    color: rgba(189, 189, 189, 0.93);
    border-radius: 25px;
    background-color: rgba(60, 60, 60, 0.88);
}
body.dark-mode .btn-custom{
    color: whitesmoke;
    border-radius: 25px;
    background-color: #2c2c2c;
}
body.dark-mode .btn-custom:hover{
    color: whitesmoke;
    border-radius: 25px;
    background-color: rgba(128, 128, 128, 0.55);
}
body.dark-mode .navbar,
body.dark-mode footer {
    background-color: #1e1e1e !important;
    color: #f1f1f1;
}

body.dark-mode .form-control,
body.dark-mode .list-group-item,
body.dark-mode table {
    background-color: #2c2c2c;
    color: #f1f1f1;
    border: 1px solid #444;
}

/* ================= Navbar ================= */
.sticky-top {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1020;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #00009f !important;
    gap: 8px;
}
.navbar-brand img {
    width: 30px;
    height: 30px;
}
.dropdown-menu .dropdown-item:hover {
    background-color: #a7a7a7;
    color: white;
}
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
    background-color: #2c2c2c !important;
    color: white !important;
}

/* ================= Cards ================= */
.card {
    border: none !important;
}
.card:hover img.card-img-top {
    transform: scale(1.1);
    filter: brightness(0.95);
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* ================= Buttons ================= */
.btn-primary {
    border-radius: 25px;
}
.btn-gradient {
    background: rgba(30, 144, 255, 0.85);
    border: none;
    color: white;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    box-shadow: 0 4px 12px rgba(102, 171, 255, 0.5);
    border-radius: 25px !important;
}
.btn-gradient:hover {
    background: rgb(0, 129, 255);
    box-shadow: 0 8px 25px rgba(87, 149, 255, 0.7);
    transform: translateY(-3px);
    color: white;
}
.btn-add-cart {
    background-color: rgb(255, 255, 255);
    border: none;
    color: rgba(67, 67, 67, 0.93);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.btn-add-cart i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}
.btn-add-cart:hover {
    background-color: rgb(255, 255, 255);
    transform: translateY(-3px);
    color: rgba(128, 128, 128, 0.55);
}

/* ================= Carousel ================= */
.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 1.5rem;
    border-radius: 10px;
}
.carousel-item img {
    transition: transform 0.8s ease;
}
.carousel-item.active img {
    transform: scale(1.05);
}
.carousel-fade .carousel-item {
    opacity: 0;
    transition-property: opacity;
    transition-duration: 1s;
}
.carousel-fade .carousel-item.active {
    opacity: 1;
}

/* ================= Typography ================= */
.product-title {
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #c82333;
}
.old-price {
    text-decoration: line-through;
    color: #777;
    font-size: 0.9rem;
}

/* ================= Footer ================= */
footer a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}
footer a:hover {
    color: #1da1f2;
}

/* ================= Social Icons ================= */
.social-icons a {
    color: white;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    font-size: 1.5rem;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.social-icons a:hover { border-bottom: 2px solid currentColor; }
.social-icons a.twitter:hover { color: #1da1f2; }
.social-icons a.instagram:hover { color: #e4405f; }
.social-icons a.youtube:hover { color: red; }
.social-icons a.github:hover { color: purple; }

/* ================= Quantity Buttons ================= */
.qty-btn {
    border-radius: 50% !important;
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.5rem;
    background: none !important;
    box-shadow: none !important;
}
.qty-btn:hover { cursor: pointer; }

/* ================= Responsive ================= */
@media (max-width: 576px) {
    .card > a.d-block {
        height: 150px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .card-img-top {
        max-height: 140px !important;
        width: auto !important;
        object-fit: contain !important;
    }
    .btn-add-cart {
        font-size: 0.7rem;
        padding: 0.5rem 0.8rem;
        border-radius: 40px;
    }
    .btn-add-cart i {
        font-size: 0.8rem;
        margin-right: 0.4rem;
    }
    .carousel-item img { max-height: 250px !important; }
    .carousel-caption { font-size: 0.9rem; padding: 0.5rem; }
    .carousel-caption h3 { font-size: 1.2rem; }
}

/* ================= Misc ================= */
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #b00000;
    color: white;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 3px;
}
.container { margin-top: 4rem !important; }
.brand-vertical {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #444;
}
.swal2-popup-small { width: 250px !important; padding: 0.6rem !important; font-size: 0.9rem !important; }
.swal2-title-small { font-size: 0.9rem !important; margin-bottom: 0.3rem !important; }

/* ================= Checkout Specific ================= */
#cart_list_tbody li {
    padding: 0.5rem 0.75rem;
}
#cart_list_tbody li span {
    margin-left: 0.5rem;
}
#label_total_usd,
#label_total_khr {
    font-weight: bold;
    font-size: 1.1rem;
}
