/* Athar Clothing - Main Stylesheet */

/* Variables */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f8f8f8;
    --accent-color: #c59d5f;
    --text-color: #333;
    --light-gray: #f2f2f2;
    --medium-gray: #e0e0e0;
    --dark-gray: #666;
    --white: #fff;
    --black: #000;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    --transition: all 0.3s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

button, .btn {
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 25px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

/* Utilities */
.text-center {
    text-align: center;
}

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

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

/* Header Enhancements - Horizontal Layout */
.header {
    background-color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    position: relative;
}

/* Top Bar Styling */
.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-message {
    margin: 0;
    font-weight: 500;
}

.language-selector a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
    font-weight: 500;
}

.language-selector a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Navbar Styling - Horizontal Layout */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.navbar-brand .logo-img {
    height: 45px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .logo-img {
    transform: scale(1.05);
}

/* Main Navigation - Horizontal Layout */
.header-main {
    display: flex;
    flex: 1;
}

.main-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
}

.main-nav-item {
    margin: 0 10px;
    white-space: nowrap;
}

.main-nav-link {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 8px 5px;
    color: var(--dark);
    transition: color 0.3s ease;
    position: relative;
}

.main-nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav-link:hover {
    color: var(--accent-color);
}

.main-nav-link:hover::after {
    width: 100%;
}

/* Highlight Link (Custom T-shirt) */
.highlight-link {
    color: var(--white);
    background-color: var(--accent-color);
    padding: 8px 15px;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    white-space: nowrap;
}

.highlight-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.highlight-link::after {
    display: none;
}

.highlight-link i {
    margin-right: 5px;
}

/* Header Tools - Horizontal Layout */
.header-tools {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.header-tools .navbar-nav {
    display: flex;
    flex-direction: row;
}

.header-tools .nav-item {
    margin: 0 8px;
}

.tool-link {
    padding: 0 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 0.85rem;
    color: var(--dark);
    transition: transform 0.3s ease, color 0.3s ease;
}

.tool-link:hover {
    color: var(--accent-color);
}

.tool-link i {
    font-size: 1.2rem;
    margin-right: 5px;
}

.tool-label {
    font-weight: 500;
}

/* Cart Styling */
.nav-cart {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* User Dropdown */
.dropdown-menu {
    padding: 15px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: none;
    border-radius: 12px;
    min-width: 220px;
    animation: dropdownFade 0.2s ease-in-out;
    margin-top: 10px;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item-text {
    padding: 12px 25px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 5px;
}

.dropdown-divider {
    margin: 5px 0;
    border-color: var(--light-gray);
}

.dropdown-item {
    padding: 10px 25px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark-gray);
    transition: all 0.3s ease;
    position: relative;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
    padding-left: 28px;
}

.dropdown-item:active {
    background-color: var(--accent-color);
    color: var (--white);
}

/* Position the dropdown correctly */
.header-tools .dropdown {
    position: static;
}

.header-tools .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0;
    transform-origin: top right;
    animation: dropdownFade 0.25s ease;
    z-index: 1021;
    margin-top: 1rem;
}

.header-tools .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 28px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--white);
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.1));
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.mobile-menu-btn:hover {
    color: var(--accent-color);
}

/* Main Categories Section */
.main-categories-section {
    padding: 3rem 0 2rem 0;
    background: var(--secondary-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 2rem;
    justify-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 0;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-item:hover {
    color: inherit;
    text-decoration: none;
    transform: translateY(-5px);
}

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #ff7675);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    box-shadow: 0 8px 25px rgba(255, 118, 117, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-item:hover .category-icon {
    box-shadow: 0 12px 30px rgba(255, 118, 117, 0.4);
    transform: scale(1.05);
}

.category-icon i {
    font-size: 2rem;
    color: white;
    z-index: 2;
}

.category-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    border-radius: 50%;
    z-index: 1;
}

.category-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    margin: 0;
    line-height: 1.3;
    max-width: 90px;
}

/* Different gradient colors for variety */
.category-item:nth-child(2n) .category-icon {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.3);
}

.category-item:nth-child(3n) .category-icon {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    box-shadow: 0 8px 25px rgba(253, 121, 168, 0.3);
}

.category-item:nth-child(4n) .category-icon {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    box-shadow: 0 8px 25px rgba(253, 203, 110, 0.3);
}

.category-item:nth-child(5n) .category-icon {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    box-shadow: 0 8px 25px rgba(162, 155, 254, 0.3);
}

.category-item:nth-child(6n) .category-icon {
    background: linear-gradient(135deg, #55efc4, #00b894);
    box-shadow: 0 8px 25px rgba(85, 239, 196, 0.3);
}

/* Loading placeholder animation */
.loading-placeholder .category-icon {
    background: linear-gradient(135deg, #ddd, #f0f0f0);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.loading-placeholder .category-icon i {
    color: #888;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Categories Section Styles */
.categories-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    transform: translateY(0);
}

.category-card:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.category-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

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

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.category-card:hover .category-overlay {
    transform: translateY(0);
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .category-image-wrapper {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-image-wrapper {
        height: 140px;
    }
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .main-nav-link {
        font-size: 0.8rem;
        padding: 8px 3px;
    }
    
    .main-nav-item {
        margin: 0 5px;
    }
    
    .tool-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 992px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .header-main {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
    }
    
    .main-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .main-nav-item {
        margin: 8px 0;
        width: 100%;
        text-align: center;
    }
    
    .header-tools .tool-label {
        display: none;
    }
    
    .header-tools .nav-item {
        margin: 0 5px;
    }
    
    /* Show menu when active */
    .header-main.active {
        display: flex;
    }
}

@media (max-width: 992px) {
    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-container,
    .about-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: nowrap; /* Prevent wrapping of navbar items */
    }
    
    .header-main {
        flex: 1; /* Allow header-main to take up remaining space */
        justify-content: center; /* Center the navigation items */
    }

    .navbar-nav {
        /* flex-basis: auto;  Override flex-basis */
        margin-top: 0; /* Remove top margin */
        display: flex; /* Keep items in a row */
        /* display: none; */
    }
    
    /* .navbar-nav.show {
        display: flex;
        flex-direction: column;
    } */
    
    .nav-item {
        margin: 0 10px; /* Reduce margin for smaller screens */
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .cart-header {
        display: none;
    }
    
    .cart-item {
        grid-template-columns: 80px 2fr 1fr;
        gap: 15px;
        padding: 15px 0;
        position: relative;
    }
    
    .cart-item-price,
    .cart-item-total {
        display: flex;
        align-items: center;
    }
    
    .item-quantity {
        grid-column: 1 / -1;
    }
    
    .remove-item {
        position: absolute;
        top: 15px;
        right: 0;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 3rem 0;
    }
    
    .hero {
        padding: 5rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f8f9fa;
}

.product-image[src^="data:image"] {
    padding: 2rem;
    object-fit: contain;
    background: #f8f9fa;
}
