@font-face {
    font-family: 'IRANSansXV';
    src: url('styles/fonts/IRANSansXV.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #10b981;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-light: #64748b;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --header-height: 75px;
}

* { box-sizing: border-box; }

body {
    font-family: 'IRANSansXV', Tahoma, sans-serif !important;
    background-color: var(--bg); color: var(--text-main);
    margin: 0; line-height: 1.7; padding-bottom: 0;
    display: flex; flex-direction: column; min-height: 100vh;
    overflow-x: hidden; width: 100%; direction: rtl;
}

a { text-decoration: none; transition: all 0.2s ease-in-out; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.header {
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    height: var(--header-height); display: flex; align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    margin-bottom: 40px; position: sticky; top: 0; z-index: 1000;
}

.header-inner {
    max-width: 1280px; width: 100%; margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center; gap: 30px;
}

.logo { font-size: 24px; font-weight: 900; color: #0f172a; letter-spacing: -0.5px; }
.logo span { color: var(--primary); }

/* Search Box */
.search-box { flex: 1; max-width: 500px; position: relative; }
.search-input {
    width: 100%; padding: 12px 20px 12px 100px; border-radius: 50px;
    border: 1px solid #e2e8f0; background: var(--surface); font-family: inherit;
    font-size: 14px; transition: all 0.3s; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.search-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.search-btn {
    position: absolute; left: 4px; top: 4px; bottom: 4px;
    background: var(--primary); color: #fff; border: none; border-radius: 50px;
    padding: 0 24px; cursor: pointer; font-family: inherit; font-weight: 600; transition: background 0.2s;
}
.search-btn:hover { background: var(--primary-dark); }

/* Layout Containers */
.container {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    display: flex; gap: 30px; align-items: stretch; flex: 1; width: 100%; padding-bottom: 50px;
}

.card {
    background: var(--surface); border-radius: var(--radius); padding: 30px;
    box-shadow: var(--shadow); margin-bottom: 30px; border: 1px solid #f1f5f9; width: 100%;
}

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-muted { color: var(--text-light); font-size: 14px; }

/* Grid & Cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }

.product-card {
    background: var(--surface); border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02); border: 1px solid #f1f5f9;
    display: flex; flex-direction: column; transition: all 0.3s ease; position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.06); border-color: #e2e8f0; }

.pc-img-box { position: relative; padding-top: 65%; background: #f8fafc; overflow: hidden; border-bottom: 1px solid #f1f5f9; }
.pc-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .pc-img { transform: scale(1.03); }

.pc-badge {
    position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px); color: var(--primary); font-size: 11px; font-weight: 700;
    padding: 6px 14px; border-radius: 50px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid rgba(255,255,255,0.4);
}

.pc-content { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.pc-title {
    font-size: 15px; font-weight: 700; margin: 0 0 16px 0; color: var(--text-main);
    line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.pc-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 12px; background: var(--surface); color: var(--text-main); border: 1px solid #e2e8f0;
    border-radius: 8px; font-weight: 600; font-size: 13px; transition: all 0.2s; cursor: pointer; text-align: center;
}
.pc-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pc-btn.solid { background: var(--primary); color: #fff; border: none; }
.pc-btn.solid:hover { background: var(--primary-dark); }

.tag-badge {
    display: inline-block; background: #f1f5f9; color: var(--text-light); padding: 6px 14px;
    border-radius: 6px; font-size: 12px; margin: 0 6px 8px 0; transition: 0.2s; font-weight: 500;
}
.tag-badge:hover { background: #e2e8f0; color: var(--text-main); }

/* Footer */
.site-footer {
            background: rgba(255, 255, 255, .4);
            backdrop-filter: blur(10px);
            text-align: center;
            padding: 10px 0;
            margin-top: 20px;
            border-top: 1px solid #e2e8f0;
            width: 100%;
        }

/* Responsive */
@media (max-width: 768px) {
    .header { height: auto; padding: 15px 0; position: static; }
    .header-inner { flex-direction: column; gap: 15px; }
    .search-box { width: 100%; max-width: 100%; }
    .container { flex-direction: column; padding: 0 15px; }
    .card { padding: 20px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}