/* Custom Styles for Sơn Nước Việt Nam */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 5rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    font-size: 1.25rem;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-section .btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.hero-section .btn-light {
    background: rgba(255,255,255,0.95);
    color: #007bff;
    border: 2px solid rgba(255,255,255,0.95);
}

.hero-section .btn-outline-light {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.8);
}

.hero-section .btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

.hero-section img {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.hero-section img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-card .card-img-top {
    transition: transform 0.3s ease;
    height: 200px;
    object-fit: cover;
    object-position: center;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-sale-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #dc3545;
}

.product-original-price {
    text-decoration: line-through;
    color: #6c757d;
}

.product-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #28a745;
}

/* Category Cards */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Header */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Company Logo Styles */
.navbar-brand .company-logo {
    max-height: 100%;
    width: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    transform: translateY(-10px);
}

.navbar-brand:hover .company-logo {
    transform: translateY(-10px) scale(1.05);
}

/* Responsive Logo - Giới hạn kích thước trên màn hình nhỏ */
@media (max-width: 768px) {
    .navbar-brand .company-logo {
        max-height: 153px;
        width: auto;
    }
}

@media (max-width: 576px) {
    .navbar-brand .company-logo {
        max-height: 127px;
        width: auto;
    }
}

@media (max-width: 480px) {
    .navbar-brand .company-logo {
        max-height: 102px;
        width: auto;
    }
}

.company-info h5 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.company-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.company-info p {
    font-size: 0.8rem;
}

.hotline-info {
    text-align: right;
}

.hotline-info .text-danger {
    font-size: 0.9rem;
}

.hotline-info small {
    font-size: 0.75rem;
}

/* Navigation */
.navbar-dark .navbar-nav .nav-link {
    font-weight: 400;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    padding: 0.6rem 0.8rem !important;
    margin: 0 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.navbar-dark .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Dropdown Menu */
.dropdown-menu {
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: none;
    padding: 0.75rem 0;
    min-width: 250px;
    max-width: 280px;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    overflow: hidden; /* Đảm bảo content tuân theo border-radius */
    z-index: 9999 !important; /* Fix z-index để dropdown luôn ở trên */
    position: absolute !important;
}

/* Fix dropdown overflow on mobile */
@media (max-width: 991.98px) {
    .dropdown-menu {
        position: static !important;
        float: none;
        min-width: 100%;
        max-width: 100%;
        margin-top: 0;
        border-radius: 12px !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
        z-index: 9999 !important;
    }
}

/* Auto position for right-side dropdowns */
.navbar-nav .nav-item:nth-last-child(-n+2) .dropdown-menu {
    left: auto;
    right: 0;
}

/* Center positioning for middle items */
.navbar-nav .nav-item:not(:first-child):not(:last-child):not(:nth-last-child(2)) .dropdown-menu {
    left: 50%;
    transform: translateX(-50%);
}

/* Ensure dropdown stays within viewport */
.dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-menu-lg {
    min-width: 280px;
}

.dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.25rem;
    margin-bottom: 0.5rem;
}

.dropdown-item {
    padding: 0.6rem 1.25rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 0.85rem;
    margin: 0.2rem 0.5rem;
}

.dropdown-item:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
    transform: translateX(3px);
    border-radius: 8px;
}

.dropdown-divider {
    margin: 0.4rem 1.25rem;
    border-color: rgba(0,0,0,0.1);
}

/* Remove duplicate dropdown styles - using the one above */

.dropdown-header {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.25rem;
    margin-bottom: 0.5rem;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(0, 123, 255, 0.02) 100%);
}

/* Duplicate dropdown-item removed - using the styled one above */

.dropdown-divider {
    margin: 0.5rem 1.5rem;
    border-color: rgba(0,0,0,0.1);
}

/* Floating Action Buttons */
.floating-actions {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
}

.floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    color: white;
}

.cart-btn {
    background: #dc3545;
}

.location-btn {
    background: #17a2b8;
}

.user-btn {
    background: #6f42c1;
}

.zalo-btn {
    background: #007bff;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ffc107;
    color: #212529;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Search Form */
.search-form {
    min-width: 300px;
}

.search-form .input-group {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 25px;
    overflow: hidden;
}

.search-form .form-control {
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.search-form .form-control::placeholder {
    color: #666;
}

.search-form .btn {
    border: none;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
}

.search-form .btn:hover {
    background: rgba(255, 255, 255, 1);
    color: #007bff;
}

.search-form .form-control {
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
}

.search-form .btn {
    border: none;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    transition: all 0.3s ease;
}

.search-form .btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Search Form */
.search-form {
    min-width: 300px;
}

/* Cart Badge */
.badge {
    font-size: 0.7rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 50px 0 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #007bff;
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Cards */
.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0 !important;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Badges */
.badge {
    border-radius: 6px;
    font-weight: 500;
}

/* Pagination */
.page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
}

.page-item.active .page-link {
    background: #007bff;
    border-color: #007bff;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.timeline-content {
    padding-left: 20px;
}

.timeline-content h6 {
    margin-bottom: 5px;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .search-form {
        min-width: auto;
        width: 100%;
        margin: 10px 0;
    }
    
    .search-form .input-group {
        border-radius: 8px;
    }
    
    .search-form .form-control,
    .search-form .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
        margin: 0.25rem 0;
        font-size: 0.9rem;
    }
    
    .dropdown-menu {
        min-width: 100%;
        border-radius: 8px;
        margin-top: 0.5rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        line-height: 35px;
        margin-right: 8px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

/* Hover Effects */
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.navbar-dark .navbar-nav .nav-link{
    white-space: nowrap;font-weight: 700;
    
}
.position-relative {
    display: flex;
    align-items: center;
    justify-content: center;
}

.position-relative img {
    max-height: 150px;
    width: auto;
}

.product-card{
    padding:1rem;
}

.product-card .card-body{
    padding: 0px;
}
.navbar {
    /* background-color: #434041 !important; */
    z-index: 1000 !important; /* Đảm bảo navbar ở trên các element khác */
    position: relative;
}
.navbar-nav  {
    width: 100%;
}

.nav-link{
    color: #fff;
}
@media (max-width: 767px) {
    .navbar-brand {
    margin-bottom: 0.5rem !important;
    }
    .hotline-info {
    gap: 2rem;
        flex-wrap: wrap;
        margin-top: 0.5rem;
    }
}