@font-face {
    font-family: 'CustomFont';
    src: url('Fonts/Vazirmatn-Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('Fonts/Vazirmatn-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
:root {
    --primary: #fbd341;
    --primary-dark: #e5bc32;
    --text: #1a1a1a;
    --text-light: #4b5563;
    --bg: #f4f5f7;
    --white: #ffffff;
    --border: #e4e6ea;
    --card-bg: #f0efe9;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-lg: 0 15px 35px rgba(0,0,0,0.2);
}
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}
body {
    font-family: 'CustomFont', Tahoma, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    box-sizing: border-box;
}
body.loading-lock { overflow: hidden !important; height: 100vh !important; touch-action: none !important; }
html.modal-open, body.modal-open { 
    overflow: hidden !important; 
    overscroll-behavior: none !important; 
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}
img {
    max-width: 100%;
    display: block;
}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}
@keyframes logoEntrance {
    0%   { opacity: 0; transform: translateY(-30px) scale(0.5) rotate(-15deg); }
    60%  { opacity: 1; transform: translateY(10px) scale(1.1) rotate(5deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInHero {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulseBadge {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229,57,53,0.6); }
    50%      { transform: scale(1.2); box-shadow: 0 0 0 5px rgba(229,57,53,0); }
}
@keyframes catIn {
    from { opacity: 0; transform: translateY(22px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cardFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes modalFadeIn {
    from { opacity: 0; backdrop-filter: blur(0); }
    to   { opacity: 1; backdrop-filter: blur(8px); }
}
@keyframes modalBoxIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.product-card, .category-card, .product-img, .main-tool-img {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform, box-shadow, opacity;
}
.header {
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    opacity: 0;
}
.app-loaded .header {
    animation: fadeInDown 0.5s ease-out forwards;
}
.top-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.logo-text {
    display: flex;
    flex-direction: column;
}
.logo-en {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    line-height: 1.2;
}
.logo-fa {
    font-size: 12px;
    color: var(--text-light);
}
.logo-img-main {
    height: 50px;
    width: auto;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-20px) scale(0.8);
    transition: transform 0.5s cubic-bezier(0.68,-0.55,0.27,1.55), filter 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(251,211,65,0));
}
.app-loaded .logo-img-main {
    animation: logoEntrance 1s ease-out 0.2s forwards;
}
.logo-img-main:hover {
    transform: rotateY(360deg) scale(1.05);
    filter: drop-shadow(0 0 12px rgba(251,211,65,0.6));
}
.search-bar {
    flex: 1;
    max-width: 520px;
    margin: 0 20px;
    position: relative;
}
.search-bar input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    border: 1.5px solid var(--border);
    border-radius: 25px;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    background: var(--bg);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.2s;
}
.search-bar input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(251,211,65,0.2);
}
.search-bar input::placeholder {
    color: #aaa;
}
.search-bar button {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 15px;
    transition: color 0.2s;
}
.search-bar button:hover {
    color: var(--primary-dark);
}
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
    margin-right: auto;
}
.cart-btn {
    position: relative;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 17px;
    color: var(--text);
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
}
.cart-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.08);
}
.cart-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #e53935;
    color: var(--white);
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
    animation: pulseBadge 2.5s ease-in-out 2s infinite;
}
.auth-btn, .btn-primary {
    background-color: var(--primary);
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
    color: var(--text);
}
.auth-btn:hover, .btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251,211,65,0.45);
}
.btn-primary:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background-color: var(--primary) !important;
    box-shadow: none !important;
    transform: none !important;
}
.btn-secondary {
    background-color: transparent;
    border: 1.5px solid var(--primary);
    padding: 10px 24px;
    border-radius: 25px;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.25s, color 0.2s;
    color: var(--text);
}
.btn-secondary:hover {
    background-color: rgba(251,211,65,0.1);
}
.resend-btn {
    display: inline-block;
    background: #f3f4f6;
    color: var(--text-light);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: bold;
}
.resend-btn:not(.disabled):hover {
    background: rgba(251,211,65,0.15);
    color: var(--primary-dark);
}
.resend-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #e4e6ea;
    color: #9ca3af;
}
.navbar {
    border-top: 1px solid var(--border);
    transition: all 0.3s ease;
}
.navbar ul {
    display: flex;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.navbar ul::-webkit-scrollbar {
    display: none;
}
.navbar ul li a {
    display: block;
    padding: 13px 22px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: color 0.25s, border-color 0.25s;
}
.navbar ul li a:hover,
.navbar ul li a.active {
    color: var(--text);
    border-bottom-color: var(--primary);
}
main {
    padding: 30px 0 40px;
}
.hero-section {
    margin-bottom: 40px;
    transition: all 0.3s ease;
}
.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.hero-bg {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}
.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 50px 56px;
    background: linear-gradient(to left, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: var(--white);
}
.hero-tag {
    display: inline-block;
    background: var(--primary);
    color: var(--text);
    font-size: 13px;
    font-weight: bold;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
    opacity: 0;
}
.app-loaded .hero-tag {
    animation: slideInHero 0.6s ease-out 0.1s forwards;
}
.hero-content h1 {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.4;
    margin-bottom: 14px;
    color: var(--primary);
    opacity: 0;
}
.app-loaded .hero-content h1 {
    animation: slideInHero 0.7s ease-out 0.3s forwards;
}
.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0;
}
.app-loaded .hero-content p {
    animation: slideInHero 0.7s ease-out 0.5s forwards;
}
.hero-btn {
    background-color: var(--primary);
    color: var(--text);
    border: none;
    padding: 15px 32px;
    border-radius: 25px;
    font-family: inherit;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
    opacity: 0;
}
.app-loaded .hero-btn {
    animation: slideInHero 0.7s ease-out 0.7s forwards;
}
.hero-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(251,211,65,0.5);
}
.categories-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 50px;
    transition: all 0.3s ease;
}
.category-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transition: transform 0.3s, box-shadow 0.3s;
}
.app-loaded .category-card:nth-child(1) { animation: catIn 0.55s ease-out 0.2s forwards; }
.app-loaded .category-card:nth-child(2) { animation: catIn 0.55s ease-out 0.35s forwards; }
.app-loaded .category-card:nth-child(3) { animation: catIn 0.55s ease-out 0.5s forwards; }
.app-loaded .category-card:nth-child(4) { animation: catIn 0.55s ease-out 0.65s forwards; }

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}
.cat-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    transition: transform 0.3s, box-shadow 0.3s;
}
.category-card:hover .cat-icon {
    transform: scale(1.12) rotate(-6deg);
    box-shadow: 0 4px 12px rgba(251,211,65,0.5);
}
.cat-icon i {
    font-size: 22px;
    color: #222;
}
.cat-body {
    flex: 1;
}
.cat-body h2 {
    font-size: 15px;
    font-weight: 800;
    color: #111;
    margin-bottom: 3px;
    white-space: nowrap;
}
.cat-body span {
    font-size: 12px;
    color: var(--text-light);
}
.main-tool-img {
    width: 85px;
    height: 85px;
    object-fit: contain;
    opacity: 0.85;
    transition: opacity 0.25s, transform 0.35s ease;
}
.category-card:hover .main-tool-img {
    opacity: 1;
    transform: scale(1.1) rotate(-4deg);
}
.products-section {
    margin-bottom: 50px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
}
.section-title span {
    display: inline-block;
    width: 5px;
    height: 24px;
    background-color: var(--primary);
    border-radius: 3px;
}
.slider-controls {
    display: flex;
    gap: 10px;
}
.slide-btn {
    background-color: var(--white);
    border: 1.5px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text);
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
}
.slide-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.08);
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    transition: all 0.3s ease;
}
.grid-all-view {
    grid-template-columns: repeat(4, 1fr) !important; 
    gap: 25px !important;
}
.product-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative;
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.3s;
    opacity: 1;
    min-width: 0;
}
.product-card.animate-card {
    opacity: 0;
    animation: cardFadeUp 0.55s ease-out forwards;
}
.product-card.pending-animation {
    opacity: 0 !important;
    animation: none !important;
}
.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}
.product-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #e53935;
    color: var(--white);
    font-size: 11px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 1;
}
.product-badge--new {
    background: #2e7d32;
}
.product-img-wrapper {
    background-color: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 165px;
    overflow: hidden;
}
.product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}
.product-card:hover .product-img {
    transform: scale(1.08);
}
.product-info {
    flex: 1;
    margin-bottom: 14px;
}
.product-title {
    font-size: 14px;
    line-height: 1.5;
    color: #444;
    margin-bottom: 8px;
    font-weight: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 42px;
}
.product-price {
    font-weight: bold;
    font-size: 15px;
    color: var(--text);
}
.product-price span {
    font-size: 12px;
    font-weight: normal;
    color: var(--text-light);
    margin-right: 3px;
}
.add-to-cart-btn {
    background-color: var(--primary);
    border: none;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
    position: relative;
    z-index: 2;
}
.add-to-cart-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(251,211,65,0.4);
}
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    height: 100dvh !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    z-index: 100000 !important;
    overscroll-behavior: contain !important;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    animation: modalFadeIn 0.3s forwards;
}
.modal-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    margin: auto !important;
    max-height: none !important;
    width: 100% !important;
}
.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    left: auto;
    background: var(--bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-light);
    transition: all 0.2s ease;
    z-index: 1000;
}
.close-modal:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}
.auth-box {
    width: 90%;
    max-width: 420px;
    padding: 30px;
}
.auth-header {
    text-align: center;
    margin-bottom: 25px;
    padding-top: 15px;
    padding-right: 30px;
}
.auth-header img {
    height: 50px;
    margin: 0 auto 10px;
}
.auth-header h2 {
    font-size: 24px;
    color: var(--primary-dark);
    letter-spacing: 1px;
}
.auth-view {
    display: none;
    animation: fadeInDown 0.4s ease;
}
.auth-view.active-view {
    display: block;
}
.auth-view h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
}
.input-group {
    margin-bottom: 15px;
}
.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}
.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(251,211,65,0.2);
}
.input-group select, 
.input-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    background-color: var(--bg);
    color: var(--text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    box-sizing: border-box;
}
.input-group select:focus, 
.input-group textarea:focus {
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(251,211,65,0.2);
}
.input-group textarea {
    resize: vertical;
    min-height: 90px;
    background-image: none;
    cursor: text;
}
.input-group select:disabled {
    background-color: #e9ecef;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.8;
    background-image: none;
}
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}
.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}
.radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background-color: var(--white);
    position: relative;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    margin: 0;
    padding: 0;
}
.radio-option input[type="radio"]:checked {
    border-color: var(--primary-dark);
    background-color: var(--primary-dark);
    box-shadow: inset 0 0 0 3px var(--white);
}
.radio-option input[type="radio"]:hover {
    border-color: var(--primary);
}
.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-light);
}
.auth-switch a {
    color: var(--primary-dark);
    font-weight: bold;
    margin-right: 5px;
    text-decoration: underline;
}
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    padding: 0 40px;
    flex-direction: row;
    direction: ltr;
}
.step {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: var(--text-light);
    background: var(--white);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}
.step.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--text);
    box-shadow: 0 0 0 4px rgba(251,211,65,0.2);
}
.step.completed {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--text);
}
.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    position: relative;
    z-index: 1;
    transition: background 0.3s ease;
}
.step-line.completed {
    background: var(--primary);
}
.otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    direction: ltr;
}
.otp-input {
    width: 50px;
    height: 55px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    background: var(--bg);
}
.otp-input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(251,211,65,0.2);
}

/* --- SSR PRODUCT LAYOUT CLASSES --- */
.product-detail-layout.ssr-view {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    margin: 30px 0 50px 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    gap: 30px;
}
.detail-image {
    flex: 1;
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    min-width: 0;
    width: 100%;
}
#detail-img, #ssr-detail-img {
    will-change: transform;
    transform-origin: center center;
    cursor: grab;
    max-width: 100%;
    max-height: 100%;
}
#detail-img:active, #ssr-detail-img:active {
    cursor: grabbing;
}
.detail-image img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}
.detail-info {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    word-wrap: break-word;
}
.product-detail-title {
    font-size: 24px;
    margin-bottom: 10px;
    line-height: 1.5;
    color: var(--text);
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.detail-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-dark);
}
.detail-price span {
    font-size: 14px;
    font-weight: normal;
    color: var(--text-light);
}
.ssr-cart-container {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}
.detail-desc {
    margin-bottom: 25px;
}
.detail-desc h4, .detail-features h4 {
    font-size: 16px;
    margin-bottom: 10px;
}
.detail-desc p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.ssr-stock-text {
    margin-top: 15px;
    color: var(--text-light);
    font-size: 13px;
    font-weight: bold;
    display: block;
}
.similar-products {
    margin-bottom: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.similar-products h4 {
    font-size: 15px;
    margin-bottom: 12px;
}
.similar-products-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    width: 100%;
}
.similar-products-list::-webkit-scrollbar {
    display: none;
}
.similar-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    min-width: 220px;
    max-width: 90%;
    transition: border-color 0.2s, background-color 0.2s;
}
.similar-card:hover {
    border-color: var(--primary);
    background-color: var(--card-bg);
}
.similar-card img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    background: var(--bg);
    border-radius: 6px;
    padding: 4px;
}
.similar-card-info {
    min-width: 0;
}
.similar-card-info h5 {
    font-size: 12px;
    font-weight: normal;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-light);
}
.similar-card-info p {
    font-size: 13px;
    font-weight: bold;
    color: var(--text);
}
.detail-features ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.detail-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-light);
}
.detail-features li i {
    color: #10b981;
}

.footer {
    background-color: #e9ecef;
    padding: 50px 0 0;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 36px;
}
.footer-col h4 {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2.5px solid var(--primary);
    display: inline-block;
}
.footer-col ul li {
    margin-bottom: 10px;
}
.footer-col ul li a {
    color: var(--text-light);
    font-size: 14px;
    transition: color 0.25s, padding-right 0.25s;
    display: inline-block;
}
.footer-col ul li a:hover {
    color: var(--primary-dark);
    padding-right: 5px;
}
.contact-col p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 13px;
}
.contact-col p i {
    color: var(--primary-dark);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-top: 1px solid #ccc;
    font-size: 13px;
    color: var(--text-light);
}
.social-icons {
    display: flex;
    gap: 12px;
}
.social-icons a {
    background-color: var(--primary);
    color: var(--text);
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 17px;
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}
.social-icons a:hover {
    background-color: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 5px 12px rgba(251,211,65,0.45);
}
.user-profile-btn {
    background-color: var(--primary);
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
}
.user-profile-btn i {
    font-size: 16px;
}
.user-profile-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 211, 65, 0.45);
}
.dashboard-box {
    max-width: 850px;
    width: 95%;
    padding: 0;
    display: flex;
    flex-direction: row;
    min-height: 500px;
}
.dashboard-sidebar {
    width: 260px;
    background: #f8f9fa;
    border-left: 1px solid var(--border);
    padding: 45px 30px 25px 0;
    display: flex;
    flex-direction: column;
}
.dash-user-info {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}
.dash-user-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--text);
    font-size: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px;
}
.dash-user-name {
    font-weight: bold;
    font-size: 16px;
    color: var(--text);
}
.dash-menu {
    display: flex;
    flex-direction: column;
}
.dash-menu-item {
    padding: 15px 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 3px solid transparent;
}
.dash-menu-item:hover {
    background: rgba(0,0,0,0.03);
    color: var(--text);
}
.dash-menu-item.active {
    color: var(--primary-dark);
    background: #fff;
    border-right-color: var(--primary);
    font-weight: bold;
}
.dash-menu-item.admin-only {
    display: none;
}
.dash-menu-item.logout {
    color: #e53935;
    margin-top: auto;
}
.dash-menu-item.logout:hover {
    background: #fee2e2;
}
.dashboard-content {
    flex: 1;
    padding: 30px;
    background: #fff;
    overflow-y: auto;
    position: relative;
    max-height: 80vh;
}
.dash-panel {
    display: none;
    animation: fadeInDown 0.3s ease;
}
.dash-panel.active {
    display: block;
}
.dash-panel h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.dash-empty-state {
    text-align: center;
    padding: 40px 0;
    color: var(--text-light);
}
.dash-empty-state i {
    font-size: 40px;
    margin-bottom: 15px;
    color: #ccc;
}
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.form-row .input-group {
    flex: 1;
    margin-bottom: 0;
}
.readonly-input {
    opacity: 0.6;
    background-color: #e9ecef !important;
    pointer-events: none;
    color: var(--text);
}
.cart-box {
    max-width: 450px;
    width: 95%;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 90vh;
    max-height: 600px;
}
.cart-header {
    padding: 20px 45px 20px 25px;
    border-bottom: 1px solid var(--border);
    background: #f8f9fa;
}
.cart-header h2 {
    font-size: 18px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: var(--bg);
    border-radius: 8px;
    padding: 5px;
}
.cart-item-info {
    flex: 1;
}
.cart-item-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--text);
}
.cart-item-info p {
    font-size: 13px;
    font-weight: bold;
    color: var(--primary-dark);
}
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border-radius: 20px;
    padding: 3px 8px;
}
.qty-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-light);
}
.qty-btn:hover {
    color: var(--primary-dark);
}
.cart-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border);
    background: #f8f9fa;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
}
.orders-list-view { display: block; }
.order-detail-view { display: none; animation: fadeInDown 0.3s ease; }
.back-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: var(--primary-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-weight: bold;
    font-family: inherit;
}
.back-btn:hover { color: var(--text); }
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.order-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.order-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: bold;
}
.order-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
}
.status-success { background: #dcfce7; color: #166534; }
.status-processing { background: #fef9c3; color: #854d0e; }
.order-body {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}
.order-imgs {
    display: flex;
    gap: 10px;
}
.order-img-container {
    position: relative;
    display: inline-block;
}
.order-img-container img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    background: var(--bg);
    border-radius: 6px;
    padding: 5px;
    border: 1px solid #eee;
}
.order-qty-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    font-size: 10px;
    font-weight: bold;
    border-radius: 4px;
    padding: 2px 5px;
    direction: ltr;
    pointer-events: none;
}
.order-details {
    text-align: left;
    font-size: 13px;
    color: var(--text-light);
}
.order-details p { margin-bottom: 4px; }
.order-details span { font-weight: bold; color: var(--text); }
.upload-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--bg);
    border: 2px dashed #bbb;
    margin: 0 auto 20px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.upload-circle:hover {
    border-color: var(--primary);
    background-color: #fff;
}
.upload-progress {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0%, transparent 0%);
    display: none;
    z-index: 1;
}
.upload-inner {
    position: absolute;
    inset: 2px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}
.upload-inner i {
    font-size: 32px;
    color: #aaa;
    transition: color 0.3s;
}
.upload-circle:hover .upload-inner i { color: var(--primary-dark); }
.upload-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
#intro-screen { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: #f8f9fa; display: flex; justify-content: center; align-items: center; z-index: 999999; direction: ltr; user-select: none; transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
#intro-screen .intro-container { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding: 2rem; animation: introFadeIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; opacity: 0; }
@keyframes introFadeIn { 0% { opacity: 0; transform: scale(0.96); } 100% { opacity: 1; transform: scale(1); } }
#intro-screen .main-row { display: flex; align-items: center; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
#intro-screen .logo-img { height: 100px; width: auto; display: block; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05)); }
#intro-screen .hitech-text { font-family: 'Vazirmatn', sans-serif; font-size: 4.5rem; font-weight: bold; color: #212529; letter-spacing: 2px; line-height: 1; white-space: nowrap; }
#intro-screen .subtitle-wrapper { margin-top: 0.5rem; transform: rotate(-3deg) translateX(4px); }
#intro-screen .protected-box { display: inline-block; padding: 0.5rem 1rem; font-family: 'Vazirmatn', sans-serif; font-size: 2rem; font-weight: 500; letter-spacing: 2px; white-space: nowrap; cursor: default; }
#intro-screen .char-span { display: inline-block; color: transparent; -webkit-text-stroke: 0.8px #333; font-style: italic; transition: color 0.15s ease, -webkit-text-stroke 0.15s ease, text-shadow 0.15s ease; will-change: color, text-shadow; }
#intro-screen .char-span.active { color: #ffc107; -webkit-text-stroke: 0.8px #ffc107; text-shadow: 0 6px 12px rgba(255, 193, 7, 0.4); }
#intro-screen .char-span.space-char { display: inline-block; min-width: 0.4em; animation: none !important; -webkit-text-stroke: 0; }
#main-content { display: flex; flex-direction: column; min-height: 100vh; opacity: 0; transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
#main-content.visible { opacity: 1; }
.slide-btn:disabled { opacity: 0.6 !important; cursor: not-allowed !important; }
.hitech-notification-wrapper { position: fixed; top: 20px; right: 20px; z-index: 9999999; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; direction: rtl; font-family: 'Vazirmatn', Tahoma, sans-serif; max-width: 90%; width: 360px; }
.hitech-notification { background: #ffffff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.2); padding: 16px 20px; display: flex; align-items: center; gap: 14px; opacity: 0; transform: translateX(60px) scale(0.95); transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); pointer-events: auto; border-right: 6px solid #22c55e; width: 100%; box-sizing: border-box; }
.hitech-notification.show { opacity: 1; transform: translateX(0) scale(1); }
.hitech-notification.error { border-right-color: #ef4444; }
.hitech-notification.success { border-right-color: #22c55e; }
.hitech-notification.info { border-right-color: #3b82f6; }
.hitech-notification .notif-icon { flex-shrink: 0; width: 50px; height: 50px; border-radius: 50%; background: #f3f4f6; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 2px solid #e5e7eb; margin-left: -10px; box-shadow: 0 4px 8px rgba(0,0,0,0.05); }
.hitech-notification .notif-icon img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.hitech-notification .notif-content { flex: 1; display: flex; flex-direction: column; }
.hitech-notification .notif-title { font-weight: bold; font-size: 15px; color: #1e293b; margin-bottom: 4px; }
.hitech-notification .notif-message { font-size: 13px; color: #475569; line-height: 1.6; }
.hitech-notification .notif-close { flex-shrink: 0; background: none; border: none; font-size: 18px; color: #94a3b8; cursor: pointer; padding: 4px; transition: color 0.2s; align-self: flex-start; margin-top: -4px; }
.hitech-notification .notif-close:hover { color: #1e293b; }
.fav-btn { position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,0.9); border: 1.5px solid var(--border); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; transition: all 0.2s; color: var(--text-light); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.fav-btn:hover { background: var(--white); transform: scale(1.1); }
.fav-btn.active { color: #eab308; border-color: #fef08a; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 20px; }
.detail-box { background: #f8f9fa; padding: 15px; border-radius: 8px; border: 1px solid #eee; display: flex; flex-direction: column; gap: 8px; }
.detail-box span { font-size: 12px; color: #666; }
.detail-box strong { font-size: 14px; color: #222; }
.invoice-box table th, .invoice-box table td { padding: 12px; border: 1px solid #e5e7eb; text-align: center; }
.invoice-box table th { background: #f9fafb; font-weight: bold; color: #374151; }
.invoice-customer p { margin: 5px 0; font-size: 14px; color: #4b5563; }
.invoice-customer strong { color: #111827; }
.floating-ticket-btn { position: fixed; bottom: 25px; right: 25px; width: 65px; height: 65px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.2); cursor: pointer; z-index: 9000; transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease; }
.floating-ticket-btn.hidden { display: none !important; }
.floating-ticket-btn.hidden-by-footer { opacity: 0 !important; visibility: hidden !important; transform: translateY(20px) scale(0.8) !important; pointer-events: none !important; }
.floating-ticket-btn img { width: 40px; height: 40px; object-fit: contain; z-index: 2; }
.floating-ticket-btn:hover { transform: scale(1.05); }
.floating-ticket-btn::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 50%; background: rgba(14, 165, 233, 0.4); z-index: 1; animation: pulse-aura 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; pointer-events: none; }
@keyframes pulse-aura { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }
.ticket-box { max-width: 800px; padding: 20px; background: #fff; border-radius: 12px; display: flex; flex-direction: column; height: 85vh; }
.ticket-header-top { display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 15px; padding-top: 15px; padding-right: 30px; }
.ticket-header-top img { width: 50px; }
.ticket-nav { display: flex; gap: 10px; margin-bottom: 15px; overflow-x: auto; padding-bottom: 5px; }
.t-nav-btn { background: #f3f4f6; border: none; padding: 8px 16px; border-radius: 20px; font-family: inherit; cursor: pointer; white-space: nowrap; transition: 0.2s; color: #4b5563; }
.t-nav-btn.active { background: var(--primary); color: white; }
.ticket-view { display: none; flex: 1; overflow-y: auto; }
.ticket-view.active-view { display: flex; flex-direction: column; }
.chat-container { display: flex; flex-direction: column; flex: 1; background: #f9fafb; border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
.chat-messages { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.6; position: relative; word-wrap: break-word; }
.chat-msg.user { background: #e0f2fe; align-self: flex-start; border-bottom-right-radius: 2px; color: #0c4a6e; }
.chat-msg.admin { background: #fff; border: 1px solid #e5e7eb; align-self: flex-end; border-bottom-left-radius: 2px; color: #1f2937; }
.chat-time { font-size: 10px; color: #888; display: block; margin-top: 5px; text-align: left; }
.chat-status-msg { padding: 15px; text-align: center; background: #f1f5f9; color: #64748b; font-size: 14px; font-weight: bold; border-top: 1px solid #e2e8f0; }
.chat-input-area { display: flex; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid #eee; align-items: center; position: relative; }
.chat-input-area textarea { flex: 1; border: 1px solid #ddd; border-radius: 20px; padding: 8px 12px; font-family: inherit; resize: none; height: 40px; line-height: 1.4; font-size: 13px; }
.chat-input-area textarea:focus { outline: none; border-color: #3b82f6; }
.emoji-btn { background: none; border: none; font-size: 22px; cursor: pointer; color: #6b7280; padding: 5px; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.emoji-btn:hover { color: #3b82f6; }
.emoji-popover { position: absolute; bottom: 60px; right: 10px; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); display: none; grid-template-columns: repeat(6, 1fr); gap: 8px; z-index: 10; }
.emoji-popover.show { display: grid; }
.emoji-item { cursor: pointer; font-size: 20px; text-align: center; transition: transform 0.1s; }
.emoji-item:hover { transform: scale(1.2); }
.ticket-list-item { border: 1px solid #e5e7eb; border-radius: 8px; padding: 15px; margin-bottom: 10px; cursor: pointer; transition: 0.2s; display: flex; justify-content: space-between; align-items: center; }
.ticket-list-item:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.t-status { font-size: 12px; padding: 4px 8px; border-radius: 4px; }
.t-status.pending { background: #fef08a; color: #854d0e; }
.t-status.open { background: #dcfce7; color: #166534; }
.t-status.closed { background: #f3f4f6; color: #4b5563; }
.pending-animation { opacity: 0 !important; animation: none !important; }

@media (max-width: 992px) {
    .categories-section { grid-template-columns: repeat(2, 1fr); }
    .products-grid, .grid-all-view { grid-template-columns: repeat(2, 1fr) !important; }
    .footer-content { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .hero-bg { height: 360px; }
    .hero-content { padding: 40px 44px; }
    .hero-content h1 { font-size: 32px; }
    .hero-content p { font-size: 17px; }
    .search-bar { max-width: 100%; }
    .product-detail-layout { flex-direction: column; }
    .detail-image { min-height: 250px; }
}
@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .top-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 10px 15px; border-bottom: none; gap: 10px; }
    .logo { flex: 0 0 auto; order: 1; gap: 8px; }
    .logo-fa { display: none; }
    .logo-en { font-size: 18px; }
    .logo-img-main { height: 36px; }
    .header-actions { flex: 0 0 auto; order: 2; gap: 10px; margin-right: 0; }
    .auth-btn, .btn-primary, .btn-secondary { padding: 8px 14px; font-size: 12px; }
    .cart-btn { width: 38px; height: 38px; font-size: 15px; }
    .search-bar { flex: 1 1 100%; order: 3; margin: 5px 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
    .search-bar input { padding: 10px 15px 10px 40px; font-size: 14px; }
    .hero-section { margin-bottom: 18px; }
    .hero-image-wrapper { border-radius: var(--radius-md); }
    .hero-bg { height: 210px; object-position: center; }
    .hero-content { padding: 18px 22px; background: linear-gradient(to left, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.5) 65%, transparent 100%); }
    .hero-tag { font-size: 10px; padding: 3px 10px; margin-bottom: 8px; }
    .hero-content h1 { font-size: 17px; line-height: 1.6; margin-bottom: 7px; color: var(--primary); }
    .hero-content p { font-size: 12px; margin-bottom: 14px; }
    .hero-btn { padding: 9px 18px; font-size: 12px; gap: 7px; }
    .categories-section { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; margin-bottom: 22px; }
    .category-card { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; padding: 12px; gap: 10px; }
    .cat-icon { width: 42px; height: 42px; margin: 0; }
    .cat-icon i { font-size: 18px; }
    .cat-body h2 { font-size: 13px; }
    .cat-body span { font-size: 10px; }
    .main-tool-img { display: none; }
    .products-section { margin-bottom: 28px; }
    .products-grid, .grid-all-view { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .section-title { font-size: 17px; }
    .section-title span { height: 20px; }
    .product-card { padding: 12px; }
    .product-badge { font-size: 10px; top: 10px; right: 10px; padding: 2px 8px; }
    .product-img-wrapper { height: 120px; padding: 10px; margin-bottom: 10px; }
    .product-title { font-size: 12px; line-height: 1.5; height: 36px; }
    .product-price { font-size: 13px; }
    .product-price span { font-size: 10px; }
    .add-to-cart-btn { font-size: 11.5px; padding: 9px 6px; }
    .slide-btn { width: 32px; height: 32px; font-size: 12px; }
    .footer { padding: 28px 0 0; }
    .footer-content { grid-template-columns: repeat(2, 1fr); gap: 18px; padding-bottom: 20px; }
    .footer-col h4 { font-size: 14px; margin-bottom: 14px; }
    .footer-col ul li a { font-size: 12.5px; }
    .contact-col p { font-size: 12.5px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; padding: 14px 0; font-size: 12px; }
    .auth-box { padding: 20px; }
    .otp-input { width: 40px; height: 45px; font-size: 20px; }
    .dashboard-box { flex-direction: column; }
    .dashboard-sidebar { width: 100%; border-left: none; border-bottom: 1px solid var(--border); }
    .dash-menu { flex-direction: row; overflow-x: auto; }
    .dash-menu-item { white-space: nowrap; border-right: none; border-bottom: 3px solid transparent; }
    .dash-menu-item.active { border-right-color: transparent; border-bottom-color: var(--primary); }
    .form-row { flex-direction: column; gap: 10px; }
    .input-group select, .input-group textarea, .input-group input { font-size: 14px; padding: 10px 12px; }
    .dashboard-content { padding: 15px; max-height: 60vh; }
    .dash-panel h3 { font-size: 16px; }
    .detail-grid { grid-template-columns: 1fr; }
    
    .product-detail-layout.ssr-view {
        margin: 15px 0 30px 0;
        padding: 15px;
        border-radius: var(--radius-md);
    }
}
@media (max-width: 700px) { #intro-screen .main-row { gap: 1rem; flex-direction: column; } #intro-screen .logo-img { height: 75px; } #intro-screen .hitech-text { font-size: 3.2rem; } #intro-screen .protected-box { font-size: 1.4rem; } #intro-screen .subtitle-wrapper { transform: rotate(-2deg) translateX(2px); } }
@media (max-width: 640px) { .hitech-notification-wrapper { right: 10px; left: 10px; width: auto; } .hitech-notification { padding: 14px 16px; } .hitech-notification .notif-icon { width: 40px; height: 40px; margin-left: -8px; } .hitech-notification .notif-title { font-size: 14px; } .hitech-notification .notif-message { font-size: 12px; } }
@media (max-width: 600px) { .detail-grid { grid-template-columns: 1fr; } .detail-box { grid-column: span 1 !important; } }
@media (max-width: 500px) {
    .category-card { flex-direction: column; justify-content: center; text-align: center; padding: 15px 10px; }
    .cat-icon { margin-bottom: 5px; }
    .main-tool-img { width: 60px; height: 60px; margin-top: 10px; }
    .products-grid, .grid-all-view { gap: 8px !important; }
    .product-card { padding: 8px; }
    .product-img-wrapper { height: 100px; padding: 5px; margin-bottom: 8px; }
    .product-title { font-size: 11px; height: 33px; margin-bottom: 6px; }
    .product-price { font-size: 12px; }
    .add-to-cart-btn { font-size: 10px; padding: 6px; }
}
@media (max-width: 450px) { #intro-screen .logo-img { height: 60px; } #intro-screen .hitech-text { font-size: 2.5rem; } #intro-screen .protected-box { font-size: 1.1rem; padding: 0.3rem; } #intro-screen .intro-container { gap: 1.2rem; padding: 1rem; } }
@media (max-width: 430px) {
    .hero-bg { height: 185px; }
    .hero-content h1 { font-size: 15px; }
    .hero-content p { display: none; }
    .hero-btn { padding: 8px 16px; font-size: 11.5px; }
    .category-card { padding: 10px; }
    .cat-icon { width: 38px; height: 38px; }
    .cat-icon i { font-size: 16px; }
    .cat-body h2 { font-size: 12px; }
    .otp-input { width: 35px; height: 40px; font-size: 18px; }
    .stepper { padding: 0 10px; }
}
@media print { @page { margin: 0; size: auto; } html, body { height: 100%; margin: 0 !important; padding: 0 !important; overflow: visible !important; } body * { visibility: hidden; } #invoice-modal, #invoice-modal * { visibility: visible; } #invoice-modal { position: absolute; left: 0; top: 0; right: 0; width: 100% !important; height: auto !important; background: white; margin: 0 !important; padding: 10px !important; box-shadow: none !important; overflow: visible !important; } .modal-box.invoice-box { padding: 0 !important; margin: 0 !important; max-width: 100% !important; border: none !important; box-shadow: none !important;} .no-print { display: none !important; } .invoice-header, .invoice-customer, table { page-break-inside: avoid; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* رفع کامل مشکل بیرون زدگی محتوا */
.product-detail-layout.ssr-view {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    margin: 30px 0 50px 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    gap: 30px;
}
.detail-info {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    word-wrap: break-word;
}
.detail-image {
    flex: 1;
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    min-width: 0;
    width: 100%;
}
.product-detail-title {
    font-size: 24px;
    margin-bottom: 10px;
    line-height: 1.5;
    color: var(--text);
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.ssr-cart-container {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}
.ssr-stock-text {
    margin-top: 15px;
    color: var(--text-light);
    font-size: 13px;
    font-weight: bold;
    display: block;
}
#ssr-detail-features {
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.similar-products-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    width: 100%;
}
.similar-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    min-width: 220px;
    max-width: 90%;
    transition: border-color 0.2s, background-color 0.2s;
}
.similar-card-info {
    min-width: 0;
}