:root {
    --primary-color: #0ea5e9; /* Light blue representing pure water */
    --primary-hover: #0284c7;
    --dark-bg: #0f172a;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f1f5f9; /* Slate gray background for better contrast */
    color: #334155;
}

/* Utilities */
.bg-primary { background-color: var(--primary-color) !important; }
.text-primary { color: var(--primary-color) !important; }
.btn-primary { 
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Nav */
.navbar .nav-link {
    color: #475569;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}
.navbar .nav-link:hover {
    color: var(--primary-color);
}

/* Hero Section & Carousel */
.hero-carousel {
    position: relative;
    border: 1px solid #e2e8f0;
}
.hero-title {
    font-weight: 800;
    color: #0f172a;
    font-size: 3rem;
    line-height: 1.2;
}
.hero-subtitle {
    color: #475569;
    font-size: 1.2rem;
}

/* Custom Navigation Icons */
.carousel-control-custom-prev-icon,
.carousel-control-custom-next-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #334155;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.carousel-control-prev,
.carousel-control-next {
    width: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

@media (min-width: 768px) {
    .hero-carousel .carousel-item {
        padding-left: 55px;
        padding-right: 55px;
    }
    .carousel-control-prev {
        left: 20px;
    }
    .carousel-control-next {
        right: 20px;
    }
}



.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev:hover .carousel-control-custom-prev-icon,
.carousel-control-next:hover .carousel-control-custom-next-icon {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: scale(1.1);
}

/* Indicators */
.carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #94a3b8;
    border: none;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    width: 22px;
    border-radius: 4px;
    background-color: var(--primary-color);
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}
.product-img-wrapper {
    width: 100%;
    height: 250px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.product-info {
    padding: 1.25rem;
}
.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 2.66rem; /* 1.4 * 0.95 * 2 lines approx */
}

.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}
.product-title:hover {
    color: var(--primary-color);
}
.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ef4444; /* Red for price */
}
.product-old-price {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: #94a3b8;
}

/* Admin Dashboard Specific */
.admin-sidebar {
    min-height: 100vh;
    background-color: var(--dark-bg);
}
.admin-sidebar .nav-link {
    color: #cbd5e1;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s;
}
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

/* ==========================================================================
   Theme & Global Component Alignment
   ========================================================================== */

/* Custom 5-Column Grid Layout */
.row-custom {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
}

.col-custom-5 {
    flex: 0 0 auto;
    width: 20%;
    padding-right: 12px;
    padding-left: 12px;
    margin-top: 24px;
}

@media (max-width: 1199.98px) {
    .col-custom-5 {
        width: 25%;
    }
}

@media (max-width: 991.98px) {
    .col-custom-5 {
        width: 33.3333333333%;
    }
}

@media (max-width: 767.98px) {
    .col-custom-5 {
        width: 50%;
    }
}

/* Category Sections on Home/Listing pages */
.category-section {
    margin-bottom: 40px;
}

.category-header-bar {
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.1), 0 2px 4px -1px rgba(14, 165, 233, 0.06);
}

.category-header-bar h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.category-header-bar h2 .cat-icon-number {
    background-color: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.btn-view-all {
    background-color: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background-color: #fff;
    color: var(--primary-color);
    border-color: #fff;
    transform: translateY(-1px);
}

/* Custom Utilities */
.transition-hover {
    transition: all 0.3s ease;
}
.transition-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

/* Main Page Canvas Layout */
.main-content-canvas {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}
.category-block-flat {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
@media (max-width: 767.98px) {
    .main-content-canvas {
        padding: 16px;
    }
}

/* ==========================================================================
   Floating Contact Widgets (Zalo & Hotline)
   ========================================================================== */
.floating-contact {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Base button styles */
.floating-contact .contact-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 48px;
}

/* Icon wrapper */
.floating-contact .icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}

/* Glowing rings (pulse effect) on the icon wrapper */
.floating-contact .icon-wrapper::before,
.floating-contact .icon-wrapper::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
}

.floating-contact .zalo-btn .icon-wrapper::before,
.floating-contact .zalo-btn .icon-wrapper::after {
    border: 2px solid rgba(84, 180, 243, 0.4);
    background-color: rgba(84, 180, 243, 0.15);
}

.floating-contact .phone-btn .icon-wrapper::before,
.floating-contact .phone-btn .icon-wrapper::after {
    border: 2px solid rgba(229, 57, 53, 0.4);
    background-color: rgba(229, 57, 53, 0.15);
}

.floating-contact .icon-wrapper::before {
    animation: contactPulse 2s infinite;
}

.floating-contact .icon-wrapper::after {
    animation: contactPulse 2s infinite 0.7s;
}

@keyframes contactPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Zalo button styling */
.floating-contact .zalo-btn .icon-wrapper {
    background-color: #54B4F3;
    box-shadow: 0 8px 24px rgba(84, 180, 243, 0.5);
}

/* Phone button styling */
.floating-contact .phone-btn .icon-wrapper {
    background-color: #e53935;
    box-shadow: 0 8px 24px rgba(229, 57, 53, 0.5);
    animation: phoneShake 2s infinite;
}

/* Styling for images inside icon wrapper */
.floating-contact .icon-wrapper img {
    width: 58%;
    height: 58%;
    object-fit: contain;
    filter: brightness(1.15) saturate(1.4);
}

@keyframes phoneShake {
    0%, 100% { transform: rotate(0); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-12deg); }
    20%, 40%, 60%, 80% { transform: rotate(12deg); }
}

.floating-contact .contact-btn:hover .icon-wrapper {
    animation: none;
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.floating-contact .zalo-btn:hover .icon-wrapper {
    box-shadow: 0 10px 28px rgba(84, 180, 243, 0.75);
}

.floating-contact .phone-btn:hover .icon-wrapper {
    box-shadow: 0 10px 28px rgba(229, 57, 53, 0.75);
}

/* Phone number banner styling */
.floating-contact .phone-btn .phone-number {
    background-color: #e53935;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 0 20px 0 25px;
    margin-left: -15px;
    height: 38px;
    display: flex;
    align-items: center;
    border-radius: 0 20px 20px 0;
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.25);
    z-index: 1;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.floating-contact .phone-btn:hover .phone-number {
    background-color: #d32f2f;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

/* Responsive Mobile adjustments */
@media (max-width: 576px) {
    .floating-contact {
        bottom: 15px;
        left: 15px;
        gap: 10px;
    }
    .floating-contact .icon-wrapper {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    .floating-contact .zalo-btn .icon-wrapper svg {
        width: 22px;
        height: 22px;
    }
    .floating-contact .phone-btn .phone-number {
        font-size: 13px;
        height: 32px;
        padding: 0 15px 0 20px;
        margin-left: -12px;
    }
}