/*
Theme Name: Ibrahim Mobile Shop
Theme URI: https://ibrahimmobileshop.com
Author: Antigravity AI
Description: A clean, modern, mobile-first custom WordPress theme for mobile accessories.
Version: 1.0.0
Text Domain: ibrahim-mobile
*/

/* 
========================================
1. RESET & BASE STYLES
========================================
*/
:root {
    --primary-color: #e6001a;
    --secondary-color: #222222;
    --accent-color: #ff9800;
    --background-light: #f4f4f4;
    --text-color: #333333;
    --white: #ffffff;
    --gray-light: #eeeeee;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 
========================================
2. TYPOGRAPHY
========================================
*/
h1, h2, h3, h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    margin: 40px 0 20px;
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto;
    border-radius: 2px;
}

/* 
========================================
3. HEADER
========================================
*/
.site-header {
    background: var(--white);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: -1px;
}

.search-bar {
    flex: 1;
    margin: 0 40px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 20px;
    border: 1px solid var(--gray-light);
    border-radius: 30px;
    outline: none;
    background: #f9f9f9;
}

@media (max-width: 768px) {
    .search-bar {
        display: none; /* Hide on mobile main header, maybe show in menu */
    }
}

/* 
========================================
4. HERO SECTION
========================================
*/
.hero {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    border-radius: 0 0 30px 30px;
}

.hero h1 {
    color: var(--white);
    font-size: 2.5rem;
}

/* 
========================================
5. CATEGORY GRID
========================================
*/
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.category-card {
    background: var(--white);
    padding: 20px 10px;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
}

.category-card span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* 
========================================
6. PRODUCT CARDS
========================================
*/
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 992px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-image {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price-wrapper {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.sale-price {
    font-size: 0.85rem;
    text-decoration: line-through;
    color: #999;
}

.btn-buy-now {
    display: block;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 600;
    font-size: 0.85rem;
}

.btn-whatsapp {
    background: #25d366;
}

/* 
========================================
7. WHATSAPP FLOATING BUTTON
========================================
*/
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* 
========================================
8. FOOTER
========================================
*/
.site-footer {
    background: var(--secondary-color);
    color: #ccc;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.8rem;
}
