/* ========================================
   Top Seller - E-commerce Website Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5b4cdb;
    --accent-color: #e74c3c;
    --accent-light: #ff6b6b;
    --background: #ffffff;
    --background-light: #f8f9fa;
    --footer-bg: #1a1a2e;
    --footer-text: #e0e0e0;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(108, 92, 231, 0.2);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.8;
    direction: rtl;
    text-align: right;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header
   ======================================== */
.header {
    background: var(--background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-light);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.header-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.cart-badge {
    position: relative;
}

.cart-badge::after {
    content: '0';
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.nav {
    padding: 15px 0;
}

.nav-list {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.nav-link {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), #a29bfe);
    border-radius: 3px;
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #a29bfe, #74b9ff);
    padding: 80px 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 10%, transparent 10%);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 30px;
}

.hero-btn {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Products Section
   ======================================== */
.products-section {
    padding: 80px 0;
    background: var(--background-light);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 50px;
    color: var(--text-color);
}

.section-title span {
    background: linear-gradient(135deg, var(--primary-color), #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image-wrapper {
    overflow: hidden;
    position: relative;
}

.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.product-info {
    padding: 20px;
}

.product-category {
    display: inline-block;
    background: var(--background-light);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
}

.old-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.add-to-cart {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), #a29bfe);
    border-radius: 3px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--footer-text);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-right: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-bottom a {
    color: var(--primary-color);
    font-weight: 600;
}

/* ========================================
   Page Content (Policy Pages)
   ======================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), #a29bfe);
    padding: 60px 0;
    text-align: center;
    color: white;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

.page-content {
    padding: 60px 0;
    background: var(--background);
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.content-wrapper h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.content-wrapper h2:first-child {
    margin-top: 0;
}

.content-wrapper h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 25px 0 10px;
}

.content-wrapper p {
    margin-bottom: 15px;
    color: var(--text-light);
    line-height: 2;
}

.content-wrapper ul {
    padding-right: 20px;
    margin-bottom: 20px;
}

.content-wrapper li {
    margin-bottom: 10px;
    color: var(--text-light);
    position: relative;
    padding-right: 25px;
}

.content-wrapper li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.last-updated {
    display: inline-block;
    background: var(--background-light);
    color: var(--text-light);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 30px;
    border-right: 4px solid var(--primary-color);
}

.content-wrapper strong {
    color: var(--primary-color);
}

.content-wrapper a {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px dashed var(--primary-color);
}

.content-wrapper a:hover {
    border-bottom-style: solid;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }

    .nav-list {
        flex-wrap: wrap;
        gap: 15px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h3::after {
        right: 50%;
        transform: translateX(50%);
    }

    .content-wrapper {
        padding: 25px;
        margin: 0 15px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}

.product-card:nth-child(5) {
    animation-delay: 0.5s;
}

.product-card:nth-child(6) {
    animation-delay: 0.6s;
}