@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

a {
    text-decoration: none;
}

:root {
    --primary-color: #3f51b5;
    --primary-light: #7986cb;
    --primary-dark: #303f9f;
}

body {
    background-color: #f9f9f9;
    color: #333;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    overflow-y: auto; /* Ensure vertical scrolling works properly */
    height: 100%;
    min-height: 100vh;
    position: relative;
}

body.dark {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* --------------------------------------------
   NAVIGATION STYLES REMOVED
   All navigation styling now comes from nav-header.css
   This eliminates conflicts between pages
   -------------------------------------------- */

/* Enhanced Modern UI for Products Page */

/* Main container spacing fix to prevent header cut-off */
.container {
    margin-top: 20px; /* Reduced from 80px since we added padding to main_box */
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

/* Create a more visually appealing header */
.product-header {
    text-align: center;
    margin-bottom: 70px;
    padding: 40px 20px;
    position: relative;
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.05) 0%, rgba(156, 39, 176, 0.05) 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.dark .product-header {
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.1) 0%, rgba(156, 39, 176, 0.1) 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-header h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 25px;
    color: #333;
    background: linear-gradient(135deg, #3f51b5 0%, #9c27b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.dark .product-header h1 {
    background: linear-gradient(135deg, #5c6bc0 0%, #ba68c8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-header p {
    font-size: 18px;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

body.dark .product-header p {
    color: #bbb;
}

/* Dramatic card styling */
.category-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-left: 0; /* Remove any previous padding */
    max-width: 1200px;
    margin: 0 auto;
}

.category-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Changed from flex-end to center the cards */
    gap: 40px;
    width: 100%;
    max-width: 1100px;
    margin: 0;
    perspective: 1000px;
}

.category-card {
    flex: 0 0 auto;
    min-width: 280px;
    max-width: 450px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    text-decoration: none;
    color: inherit;
    background-color: #fff;
    border: none;
    transform-style: preserve-3d;
    position: relative;
}

body.dark .category-card {
    background-color: #252525;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.category-card:hover {
    transform: translateY(-20px) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

body.dark .category-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.category-image {
    height: 280px !important;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border-bottom: none;
}

body.dark .category-image {
    background-color: #1e1e1e;
}

.category-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(63, 81, 181, 0.2) 0%, rgba(156, 39, 176, 0.2) 100%);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.category-card:hover .category-image::before {
    opacity: 1;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-content {
    padding: 30px;
    position: relative;
    z-index: 2;
    background: #fff;
    transition: all 0.3s ease;
    text-align: center;
}

body.dark .category-content {
    background: #252525;
}

.category-title {
    font-size: 26px;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    position: relative;
    display: block;
    width: 100%;
}

/* --- Explore Our Categories heading and underline --- */
.explore-categories-title {
    display: inline-block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    color: transparent;
    background: linear-gradient(135deg, #8e24aa 0%, #9c27b0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    border: none;
    padding-bottom: 0;
    letter-spacing: 1px;
}

.explore-categories-underline {
    width: 70px;
    height: 6px;
    background: #8e24aa;
    border-radius: 3px;
    margin: 0 0 0 2px;
    display: block;
}

@media (max-width: 768px) {
    .explore-categories-title {
        font-size: 28px;
    }
    .explore-categories-underline {
        width: 50px;
        height: 5px;
    }
}

.category-description {
    font-size: 16px;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.7;
}

body.dark .category-description {
    color: #bbb;
}

.category-btn {
    background: linear-gradient(135deg, #3f51b5 0%, #9c27b0 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    box-shadow: 0 8px 15px rgba(63, 81, 181, 0.3);
    position: relative;
    overflow: hidden;
}

.category-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(63, 81, 181, 0.4);
}

/* Phone category specific styling */
.category-row .category-card:nth-child(2) .category-image {
    background-color: #f0f0f0;
}

body.dark .category-row .category-card:nth-child(2) .category-image {
    background-color: #1e1e1e;
}

/* Responsive styles */
@media (min-width: 1024px) {
    .sidebar_menu {
        left: 0;
    }
    
    .main-content {
        margin-left: 280px;
    }
    
    .mobile-toggle, .mobile-top-bar {
        display: none;
    }
}

@media (max-width: 1023px) {
    .sidebar_menu {
        left: -280px;
    }
    
    .sidebar_menu.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-top-bar {
        display: flex;
    }
    
    .category-row {
        flex-direction: column;
    }
}

/* General Styles */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 70px 15px 20px;
}

header {
    text-align: left;
    margin-bottom: 20px;
    padding-left: 140px; /* Increased padding by 20px (from 120px to 140px) */
}

.title {
    font-size: 36px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    border-bottom: none !important;
}

/* Remove ALL existing underlines */
.title::before, 
.title::after {
    display: none !important;
    content: none !important;
    border: none !important;
    background: none !important;
}

/* Remove any other potential styling that could create underlines */
.title, .title * {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* Dark mode styling for the title moved to product-dark-colors.css */

/* Mobile styling for the header */
@media screen and (max-width: 480px) {
    .container {
        padding-top: 60px;
    }
    .title {
        font-size: 30px !important;
        margin-top: 0px !important;
        margin-bottom: 5px !important;
        letter-spacing: normal;
        line-height: 1.2;
    }
}

/* Category styling */
.category-container {
    margin: 40px 0;
}

.category-row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.category-card {
    flex: 1;
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 0;
}

body.dark .category-card {
    background-color: #2a2a2a;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

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

body.dark .category-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.category-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-content {
    padding: 20px;
    text-align: center;
}

.category-title {
    font-size: 22px;
    margin-bottom: 10px;
    color: #333;
    display: block;
    width: 100%;
}

body.dark .category-title {
    color: #f5f5f5;
}

.category-description {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
    min-height: 45px;
}

body.dark .category-description {
    color: #aaa;
}

.category-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3f51b5;
    color: white;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(63, 81, 181, 0.3);
}

body.dark .category-btn {
    background-color: #5c6bc0;
}

body.dark .category-btn:hover {
    box-shadow: 0 5px 15px rgba(92, 107, 192, 0.3);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .category-row {
        flex-direction: column;
        gap: 20px;
    }
    .category-card {
        min-width: 100%;
    }
    .category-image {
        height: 180px;
    }
    .category-title {
        font-size: 20px;
    }
    .category-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .category-image {
        height: 150px;
    }
    .category-content {
        padding: 15px;
    }
}

/* Page header styling */
.product-header {
    text-align: center;
    margin-bottom: 30px;
}

.product-header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
}

.product-header p {
    font-size: 16px;
    color: #666;
}

body.dark .product-header h1 {
    color: #e0e0e0;
}

body.dark .product-header p {
    color: #aaa;
}

/* Override any existing title styling that might cause second underline */
header h1::before,
header h1::after,
.title::before,
.title::after,
header .title::before,
header .title::after {
    display: none !important;
    content: none !important;
    border: none !important;
    background: none !important;
}

/* Target any possible header elements with more specific selectors */
header h1,
header .title,
.container header h1,
.container header .title {
    border-bottom: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* Fix for any global category styling */
.custom-title-wrapper .title,
#category-title {
    border-bottom: none !important;
}

/* Ensure the container doesn't have a border */
header, 
.custom-title-wrapper {
    border-bottom: none !important;
    background: none !important;
}

/* Fix for main_box to ensure proper scrolling */
.main_box {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow-y: visible !important; /* Force allow vertical scrolling */
    padding-top: 60px; /* Add padding to account for the fixed navbar height */
}
