/* Basic styling for CasaMandelli */

:root {
    --bs-primary: #d60000;
    --bs-primary-rgb: 214, 0, 0;
    --bs-btn-color: #fff;
    --bs-btn-bg: #d60000;
    --bs-btn-border-color: #d60000;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #b30000;
    --bs-btn-hover-border-color: #b30000;
    
    /* Primary colors */
    --primary-color: #d60000;
    --primary-hover: #b30000;
}

/* Navbar Layout Fix */
.navbar {
    padding: 0.5rem 0;
    position: relative;
}

.navbar .container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.navbar-brand {
    margin-right: auto;
    flex-shrink: 0;
}

.navbar-brand img {
    max-height: 50px;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Primary button styling */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    font-weight: 600;
    text-decoration: none;
    opacity: 1 !important;
    visibility: visible !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.btn-primary.active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Navigation links styling */
.navbar-nav .nav-link {
    font-weight: 600;
    color: #333 !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 700;
}

/* Dropdown styling */
.dropdown-toggle::after {
    color: inherit;
}

.dropdown-menu {
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Breadcrumbs Styling - FIXED */
.breadcrumbs-section {
    background-color: #f8f9fa !important;
    padding: 1rem 0 !important;
    border-bottom: 1px solid #dee2e6 !important;
    margin-bottom: 0 !important;
}

.breadcrumb {
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.9rem !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›" !important;
    color: #6c757d !important;
    font-weight: bold !important;
    padding: 0 0.5rem !important;
}

.breadcrumb-item a {
    color: #6c757d !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.breadcrumb-item a:hover {
    color: var(--primary-color) !important;
}

.breadcrumb-item.active {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #343a40;
    margin: 0;
}

/* Cards and Feature Boxes */
.category-card {
    transition: transform 0.2s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.feature-box {
    transition: transform 0.2s;
}

.feature-box:hover {
    transform: translateY(-3px);
}

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

/* Footer hover styles */
.footer-link:hover {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

.footer-bottom-link:hover {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

/* Mobile Menu Styling - Fullscreen */
@media (max-width: 991.98px) {
    .navbar-collapse::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .navbar-collapse.show::after {
        opacity: 1;
    }
    
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #fff;
        z-index: 9999;
        padding: 2rem;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .navbar-collapse.show {
        transform: translateX(0);
    }
    
    .navbar-collapse.collapsing {
        transform: translateX(-50%);
    }
    
    .navbar-collapse::before {
        content: "✕";
        position: absolute;
        top: 1rem;
        right: 1.5rem;
        font-size: 1.5rem;
        color: #333;
        cursor: pointer;
        z-index: 10000;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: #f8f9fa;
        transition: all 0.3s ease;
        border: 2px solid #dee2e6;
    }
    
    .navbar-collapse::before:hover {
        background-color: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: scale(1.1);
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .navbar-brand img {
        height: 40px;
    }
    
    .navbar-toggler {
        display: block !important;
        position: relative;
        z-index: 1001;
        padding: 0.2rem 0.4rem;
        font-size: 1rem;
    }
    
    .navbar-nav {
        width: 100%;
        text-align: center;
        padding: 0;
    }
    
    .navbar-nav .nav-item {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        display: block;
        width: 100%;
    }
    
    .btn-primary {
        display: inline-block;
        margin-top: 0.5rem;
        width: auto;
        padding: 0.5rem 2rem;
    }
    
    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: #f8f9fa;
        border: none;
        box-shadow: none;
    }
    
    .dropdown-menu .dropdown-item {
        text-align: center;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 767.98px) {
    .breadcrumbs-section .col-md-4 {
        margin-top: 0.5rem;
        text-align: left !important;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .navbar {
        padding: 0.25rem 0;
    }
    
    .navbar-brand img {
        height: 35px;
    }
    
    .navbar-toggler {
        padding: 0.15rem 0.3rem;
        font-size: 0.9rem;
    }
}

/* Product page responsive fixes */
.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.product-share {
    margin-top: 1rem;
}

/* Responsive button styling */
@media (max-width: 767.98px) {
    .product-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .product-actions .btn {
        width: 100%;
        text-align: center;
        margin: 0;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .product-share {
        margin-top: 1.5rem;
        text-align: center;
        width: 100%;
    }
    
    .product-share .btn {
        width: auto;
        margin: 0 0.25rem;
    }
}

@media (max-width: 575.98px) {
    .product-actions .btn {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .btn-lg {
        font-size: 1rem !important;
        padding: 0.875rem 1.5rem !important;
    }
    
    .card-img-top {
        height: 150px !important;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    .thumbnail-image {
        margin-bottom: 0.5rem;
    }
    
    #main-image {
        max-height: 300px;
        object-fit: contain;
        width: 100%;
    }
}

/* Color swatches fix */
.color-swatch {
    vertical-align: middle;
}

/* Badge spacing fix */
.badge {
    margin-bottom: 0.25rem;
}

/* Better mobile spacing for product info */
@media (max-width: 767.98px) {
    .container.py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .col-lg-6.mb-4 {
        margin-bottom: 2rem !important;
    }
    
    h1.h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    h3.text-primary {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    h5, h6 {
        margin-bottom: 0.75rem;
        margin-top: 1.25rem;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
}

/* Fix for product characteristics on mobile */
@media (max-width: 575.98px) {
    .characteristics ul {
        padding-left: 1rem;
    }
    
    .characteristics li {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
}