/* مورد توجه استاد عزیز ، در این پروژه از هوش مصنوعی استفاده شده است */

/* ===== فونت Iran Sans (لوکال) ===== */
@font-face {
    font-family: 'Iran Sans';
    src: url('fonts/IRANSansWeb.woff') format('woff');
    font-weight: normal;
}

@font-face {
    font-family: 'segoe';
    src: url('fonts/SEGOEPR.TTF');
}

/* ===== استایل‌های پایه ===== */
body {
    font-family: 'Iran Sans', Tahoma, sans-serif;
    font-size: 16px;
    color: #333333;
    background: #ffd8d8;
    line-height: 1.7;
    direction: rtl;
}

a { 
    text-decoration: none; 
    color: inherit; 
    cursor: pointer;
}

img { 
    max-width: 100%; 
    display: block; 
}

/* ===== هدر ===== */
.header {
    position: sticky;
    background: #FFFFFF;
    border-radius: 10rem;
}

.header-container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    min-height: 70px;
    gap: 10px;
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.logo-icon { 
    font-size: 32px; 
}

.logo-text { 
    font-size: 24px; 
    font-weight: bold; 
    color: #E91E63; 
}

/* منو */
.nav { 
    display: flex; 
    gap: 25px; 
}

.nav-link { 
    font-size: 15px; 
}

.nav-link:hover, .nav-link.active { 
    color: #E91E63; 
}

.nav-link.active { 
    border-bottom: 2px solid #E91E63; 
}

/* دراپ‌داون */
.dropdown { 
    position: relative; 
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #FFFFFF;
    border-radius: 12px;
    min-width: 180px;
    padding: 10px 0;
    visibility: hidden;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: #FFF5F5;
    color: #E91E63;
}

/* اکشن‌های هدر */
.header-actions { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

/* جستجو */
.search-box { 
    position: relative; 
    width: 250px; 
}

.search-input {
    width: 100%;
    height: 42px;
    border-radius: 25px;
    border: 2px solid #f0d0dd;
    padding: 0 40px 0 15px;
    font-family: 'Iran Sans', Tahoma, sans-serif;
    font-size: 14px;
    margin-bottom: 0;
}

.search-input::placeholder { 
    color: #bbb; 
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 30%;
    font-size: 18px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* user */
.user-icon { 
    position: relative; 
    font-size: 26px; 
}

.cart-icon {
    font-size: 180%;
}

/* ===== محتوای اصلی ===== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== بنر ===== */
.hero {
    background: #d02e54;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    color: #FFFFFF;
    margin: 30px 0 60px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content { 
    max-width: 600px; 
}

.hero-title { 
    font-size: 36px; 
    font-weight: bold; 
    margin-bottom: 16px; 
}

.hero-subtitle { 
    font-size: 18px; 
    opacity: 0.9; 
    margin-bottom: 30px; 
}

/* ===== دکمه‌ها ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-family: 'Iran Sans', Tahoma, sans-serif;
    font-size: 16px;
    font-weight: bold;
    border: none;
    text-align: center;
}

.del-btn-cart {
    margin-top: 5px;
    background: #d02e54;
    color: white;
    border: none;
    padding: 10px;
    font-family: 'Iran Sans', Tahoma, sans-serif;
    border-radius: 8px;
    cursor: pointer;
}

.del-btn-cart:hover {
    background: #C2185B;
}

.btn-primary {
    background: #FFFFFF;
    color: #E91E63;
    font-size: 18px;
    padding: 14px 36px;
}

.btn-primary:hover {
    background: #fce4ec;
    cursor: pointer;
}

.btn-cart {
    background: #d02e54;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: "Iran Sans";
}

.btn-cart:hover {
    background: #C2185B;
}

/* ===== بخش‌ها ===== */
.section { 
    margin-bottom: 60px; 
}

.section-header { 
    text-align: center; 
    margin-bottom: 40px; 
}

.section-title { 
    font-size: 28px; 
    font-weight: bold; 
    margin-bottom: 10px; 
}

.products-container {  /* Fixed: was .products-countainer */
    background: #d02e54;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    color: #FFFFFF;
    margin: 30px auto 60px;  /* Added auto for centering */
    display: flex;
    width: 55%;
    gap: 24px;
}

.mode-selector {
    background: #333333;
    color: #FFFFFF;
    width: 25%;
    justify-self: center;
    text-align: center;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 12px;
    padding: 1% 0% 1% 0%;
    margin-top: 20px;
    font-size: 115%;
}

.vertical-divider {
    width: 1px;
    height: 20px;         
    background: #ccc;     
}

.signin-signup.active {
    color: rgb(233, 30, 99);
    border-bottom: rgb(233, 30, 99);
    border-bottom: 2px solid;
}

.signin-signup:hover {
    color: rgb(233, 30, 99);
}

.signin-sigup-container {
    background: #d02e54;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    color: #FFFFFF;
    margin: 20px 0 60px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    width: 50%;
}

.cart-countainer {
    background: #d02e54;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    color: #FFFFFF;
    margin: 30px auto 30px;  /* Added auto for centering */
    display: flex;
    width: 47%;
    gap: 24px;
}

.cart-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%; 
}

.cart-total-container {
    background: #d02e54;
    border-radius: 25px;
    padding: 20px 10px;
    text-align: center;
    color: #FFFFFF;
    margin: 20px auto 60px;  /* Added auto for centering */
    display: flex;
    width: 47%;
}

.footer-navs-container {
    background: #d02e54;
    border-radius: 25px;
    padding: 20px 10px;
    text-align: center;
    color: #FFFFFF;
    margin: 20px auto 60px;  /* Added auto for centering */
    width: 50%;
    text-align: center;
    line-height: 51px
}

.dashboard-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    min-height: 60%;
}

.dash-mode-selectors-wrapper {
    display: flex;
    flex-direction: column;
    width: 20%;
    margin: 30px 10px 60px 10px;
    max-height: 80%;
}

.dash-mode-selectors-wrapper .dash-mode-selector {
    width: 100%;
    margin: 0 0 15px 0;
}

.dash-mode-selectors-wrapper #dash-mode-one {
    margin-bottom: 15px;
    height: 40px;
    padding-top: 4%;
    max-height: 40px;
}

.dash-mode-selector {
    order: 1;
    width: 20%;
    height: 200px;
    background-color: #333333;
    margin: 30px 10px 60px 10px;  
    max-height: 150px;
    border-radius: 25px;
    color:#FFFFFF;
    justify-items: center;
    text-align: center;
    padding-top: 10px;
}

.dash-nav-link-divider {
    background-color: #FFFFFF;
    border-radius: 100%;
    width: 50%;
    height: 2%;
    margin-top: 15px;
    margin-bottom: 10px;
}

.dashboard-nav-links:hover {
    color: #E91E63;
}

.dashboard-nav-links.active {
    color: #E91E63;
    border-bottom: solid 2px;
}

.dashboard-nav-links {
    padding-bottom: 2px;
}


.dashboard-container {
    order: 2;
    flex: 1;
    background: #d02e54;
    border-radius: 12px;
    padding: 60px 40px;
    min-height: 100px;
    text-align: center;
    color: #FFFFFF;
    margin: 30px 10px 60px 60px;  
    display: flex;
    flex-direction: column; /* Add this */
    max-width: 50%;
    width: auto;
    gap: 24px;
} 

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

#popup {
    display: none;
    position: fixed;
    top: 40%;
    left: 40%;
    background: white;
    padding: 20px;
    border-radius: 12px;
    min-width: 280px;
    text-align: center;
    z-index:100;
}

#popup p {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

#popup button {
    background: #E91E63;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Iran Sans', Tahoma, sans-serif;
    font-size: 14px;
}

#popup button:hover {
    background: #C2185B;
}

#edit-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

#edit-popup {
    display: none;
    position: fixed;
    top: 40%;
    left: 40%;
    background: white;
    padding: 20px;
    border-radius: 12px;
    min-width: 280px;
    text-align: center;
    z-index:100;
}

#edit-popup p {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

#edit-popup button {
    background: #E91E63;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Iran Sans', Tahoma, sans-serif;
    font-size: 14px;
}

#edit-popup button:hover {
    background: #C2185B;
}

.alert-toast {
    width: 80%; /* Changed from 20% to full width */
    height: 60px;
    background-color: #d4a01b;
    color: rgb(236, 236, 236);
    margin-bottom: 20px; 
    padding-top: 9%;
    border-radius: 8px;
    justify-self: center;
    text-align: center;
}

.alert-toast#toast-success {
    background-color: #1caa03;
}

.alert-toast#edit-toast-success {
    background-color: #1caa03;
}

input {
    width: 100%;
    height: 45px;
    border-radius: 25px;
    border: 2px solid #f0d0dd;
    padding: 0 40px 0 15px;
    font-family: 'Iran Sans', Tahoma, sans-serif;
    font-size: 150%;
    margin-bottom: 5%;
}

select {
    background: none;
    font-family: 'Iran Sans';
    border-radius: 25px;
    font-size: 110%;
    margin-bottom: 5%;
    border-color: rgb(240, 208, 221);
}

#submit_btn {
    border-radius: 25px;
    width: 50%;
    height: 40px;
    font-size: 100%;
    background: #ffffff;
    font-family: 'Iran Sans', Tahoma, sans-serif;
    color: #E91E63;
    font-weight: bold;
    border: 2px solid #f0d0dd;
    padding-top: 1%;
    padding-bottom: 5%;
    padding-left: 15px;
    padding-right: 15px;
}

#submit_btn:hover {
    background: #fce4ec;
}

#submit_btn:disabled {
    background: #d5d5d5;
    cursor:not-allowed;
}

#pay-btn {
    border-radius: 25px;
    width: 30%;
    height: 40px;
    font-size: 100%;
    background: #ffffff;
    font-family: 'Iran Sans', Tahoma, sans-serif;
    font-weight: bold;
    border: 2px solid #f0d0dd;
    padding-top: 1%;
    padding-bottom: 4%;
    padding-left: 15px;
    padding-right: 15px;
    margin-right: 50%;
}

#pay-btn:hover {
    cursor: pointer;
    background: #dcdcdc;
}

#pay-btn:disabled {
    background: #d5d5d5;
    cursor:not-allowed;
}

/* ===== گرید محصولات ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%; 
}

.product-card {
    background: #FFFFFF;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
}

.product-image {
    height: 220px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;  /* Added to push price to bottom */
}

.product-category { 
    font-size: 13px; 
    color: #777777; 
    margin-bottom: 6px; 
}

.product-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333333;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #E91E63;
    margin-top: auto;
    margin-bottom: 5px;
}

.currency {
    font-size: 14px;
}


/* ===== گرید مناسب‌ها ===== */
.occasions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.occasion-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.occasion-icon { 
    font-size: 56px; 
}

.occasion-name { 
    font-size: 18px; 
    font-weight: bold; 
}

.occasion-link {
    color: #E91E63;
    font-size: 14px;
    font-weight: bold;
}

.occasion-link:hover { 
    color: #C2185B; 
    text-decoration: underline; 
}

/* ===== ویژگی‌ها ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 30px 20px;
    background: #FFFFFF;
    border-radius: 12px;
}

.feature-icon { 
    font-size: 56px; 
    display: block; 
    margin-bottom: 16px; 
}

.feature-title { 
    font-size: 18px; 
    font-weight: bold; 
    margin-bottom: 10px; 
}

.feature-desc { 
    font-size: 15px; 
    color: #777777; 
    line-height: 1.8; 
}

/* ===== فوتر ===== */
.footer {
    background: #333333;
    color: #ccc;
    padding: 30px 20px;
    margin-top: 60px;
    border-radius: 10rem;
}

.footer-container {
    max-width: 95%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.footer-links { 
    display: flex;
    gap: 20px;
}

.footer-links a { 
    color: #ccc; 
    text-decoration: none;
}

.footer-links a:hover { 
    color: #E91E63; 
}