/**
 * Main CSS for TowerSmart
 */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Header / Navbar --- */
.navbar {
    background: linear-gradient(135deg, var(--header-color), var(--header-dark)) !important;
    box-shadow: 0 4px 15px var(--shadow-color);
    padding: 1rem 0;
    transition: all 0.3s ease;
}
.navbar-brand img { height: 45px; transition: transform 0.3s; }
.navbar-brand:hover img { transform: scale(1.05); }

.nav-link {
    font-weight: 500;
    margin: 0 0.2rem;
    padding: 0.5rem 1rem !important;
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
}
.nav-link:hover, .nav-link.active {
    background-color: rgba(255,255,255,0.1);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--title-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after { width: 60%; }

.dropdown-menu {
    border: none;
    border-radius: 0;
    box-shadow: 0 10px 30px var(--shadow-color);
}
.dropdown-item:hover {
    background-color: var(--title-light);
    color: white;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    color: white;
    padding: 80px 0;
    margin-bottom: 0;
    overflow: hidden;
    background-color: var(--header-color);
    min-height: 40vh;
    display: flex;
    align-items: center;
}
.hero-video, .hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    object-fit: cover;
}
.hero-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero-section h1 {
    font-weight: 800;
    font-size: 3.8rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
    animation: slideDown 1s ease-out;
}
.hero-section .lead {
    font-size: 1.4rem;
    opacity: 0.9;
    animation: slideUp 1s ease-out 0.3s backwards;
}

/* --- Search & Filter Section --- */
.search-filter-section {
    background: var(--bg-light);
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px var(--shadow-color);
    position: relative;
    z-index: 10;
}
.filter-card {
    background: white;
    border-radius: 0;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}
.filter-card h4 {
    color: var(--title-color);
    margin-bottom: 20px;
    font-weight: 700;
}
.form-control, .form-select {
    border-radius: 0;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}
.form-control:focus, .form-select:focus {
    box-shadow: none;
    border-color: var(--title-color);
    background: white;
}

/* --- Product Cards --- */
.product-card {
    border: var(--border-width) var(--border-style) var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px var(--shadow-color);
    overflow: hidden;
    background-color: white;
    margin-bottom: 30px;
}
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-color);
}
.item-image {
    height: 200px;
    object-fit: cover;
    transition: transform 0.6s ease;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.product-card:hover .item-image { transform: scale(1.1); }

/* --- CEO Message Animation --- */
.ceo-message-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: white;
}
.ceo-message-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        var(--title-color),
        transparent 30%
    );
    animation: rotate-border 4s linear infinite;
    z-index: 1;
}
@keyframes rotate-border {
    100% { transform: rotate(1turn); }
}

/* --- Feedback System (Likes & Ratings) --- */
.like-btn {
    background: none;
    border: none;
    transition: all 0.3s ease;
}
.like-btn:hover { transform: scale(1.2); }
.star-icon {
    cursor: pointer;
    transition: transform 0.2s;
}
.star-icon:hover { transform: scale(1.3); }

/* --- Footer --- */
.footer {
    background: linear-gradient(135deg, var(--header-dark), #000);
    color: white;
    padding: 80px 0 30px;
}
.footer h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}
.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--title-color);
}
.footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    margin-bottom: 10px;
}
.footer a:hover {
    color: var(--title-color);
    padding-left: 5px;
}
.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white !important;
    transition: all 0.3s;
}
.social-icon:hover {
    background: var(--title-color);
    transform: translateY(-3px);
}

/* --- Animations --- */
@keyframes slideDown { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- Back to Top --- */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}
.scroll-top.show { opacity: 1; visibility: visible; }

/* --- Enhanced Header --- */
.navbar-toggler:focus { box-shadow: none; }
.nav-link { font-size: 0.95rem; letter-spacing: 0.3px; }
.dropdown-item { transition: all 0.2s; }
.dropdown-item:active { background-color: var(--title-color); }

/* --- Modal Customization --- */
.modal-content { border-radius: 1.25rem; border: none; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-header { border-bottom: 1px solid rgba(0,0,0,0.05); padding: 1.5rem; }
.modal-footer { border-top: 1px solid rgba(0,0,0,0.05); padding: 1.25rem; }

/* --- Feedback Stats Row --- */
.hover-up { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-up:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

/* --- Responsive adjustments --- */
@media (max-width: 991.98px) {
    .navbar { padding: 0.5rem 0; }
    .navbar-collapse {
        background: var(--header-dark);
        margin: 0.5rem -1rem -0.5rem;
        padding: 1.5rem;
        border-radius: 0 0 1.5rem 1.5rem;
        box-shadow: 0 15px 30px rgba(0,0,0,0.4);
        border-top: 1px solid rgba(255,255,255,0.05);
    }
    .nav-link {
        padding: 0.8rem 1rem !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .nav-link:last-child { border-bottom: none; }
    .navbar-brand { margin-right: auto !important; }
}
