:root {
    --primary-color: #ffb300; /* Amber */
    --secondary-color: #4a2c2a; /* Dark Brown */
    --background-color: #fffbf2; /* Light Cream */
    --text-color: #333;
    --white-color: #fff;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Vazirmatn', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3 {
    color: var(--secondary-color);
    font-weight: 700;
}

h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Header & Navbar */
header {
    background: var(--white-color);
    box-shadow: var(--box-shadow);
    padding: 10px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-left: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 700;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
#user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
#user-name {
    font-weight: bold;
    color: var(--secondary-color);
}

.action-btn {
    text-decoration: none;
    color: var(--secondary-color);
    padding: 8px 16px;
    border: 2px solid var(--secondary-color);
    border-radius: var(--border-radius);
    transition: all 0.3s;
}

.action-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

.cart-icon {
    position: relative;
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background-size: cover;
    background-position: center;
    color: var(--white-color);
    text-align: center;
    padding: 120px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content h2 {
    font-size: 3rem;
    color: var(--white-color);
    margin-bottom: 20px;
}
.hero-content h2::after{
    background-color: var(--white-color);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
}
.responsive-img {
    height: 580px;               /* ✅ no quotes */
    width: fit-content;          /* valid if parent allows it */
    padding: 10px;
    display: block;
    margin: auto;
    border-radius: 20px; 
}
@media (max-width: 767px) {
    .responsive-img {
        width: 100%;         /* fills screen width */
        height: auto;        /* keeps aspect ratio */
        padding: 5px;        /* optional smaller padding on mobile */
        border-radius: 15px; /* optional: slightly smaller corners */
    }
}
.btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 700;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: var(--secondary-color);
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: background-color 0.3s;
    width: 100%;
    margin: 10px 0;
}
.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn:hover {
    background-color: #e6a200;
}

/* Sections */
section {
    padding: 60px 0;
}

#about, #certs, #gallery {
    background-color: var(--white-color);
}

#about p, #gallery p {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 1.1rem;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 4px solid var(--white-color);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card img {
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.product-card h3 {
    margin: 10px 0;
}

.product-card .price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: auto;
    margin-bottom: 15px;
}
.product-card .btn {
    width: 100%;
}
.whatsapp-btn {
    width: 100%;
    background-color: #25D366;
}
.whatsapp-btn:hover {
    background-color: #1DAE54;
}
.whatsapp-btn i {
    margin-left: 8px;
}

/* Certifications */
#certs p {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    justify-items: center;
}

.cert-item {
    text-align: center;
}

.cert-item img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    padding: 5px;
    background-color: var(--white-color);
    box-shadow: var(--box-shadow);
}
.cert-item span {
    display: block;
    margin-top: 10px;
    font-weight: 700;
    color: var(--secondary-color);
}
/* Location */
.map-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
#location p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}
/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 40px 0 20px;
}
footer h3 {
    color: var(--primary-color);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}
.footer-about, .social-media {
    flex: 1;
    min-width: 250px;
}
.social-media {
    text-align: left;
}
.social-media a {
    color: var(--white-color);
    font-size: 1.8rem;
    margin-right: 15px;
    transition: color 0.3s;
}
.social-media a:last-child {
    margin-right: 0;
}
.social-media a:hover {
    color: var(--primary-color);
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #5a4241;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    animation: fadeIn 0.3s;
    position: relative;
}

@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.9);}
    to {opacity: 1; transform: scale(1);}
}

.close-button {
    color: #aaa;
    position: absolute;
    left: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#cart-items, #order-history-container {
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.cart-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    background: #eee;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item button.remove-from-cart {
    background: #ff6b6b;
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

#total-price {
    text-align: left;
    margin-top: 20px;
}

/* Auth and Checkout Modal Forms */
.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.modal-content form label {
    font-weight: bold;
    margin-bottom: -10px;
}
.modal-content form input,
.modal-content form select,
.modal-content form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: 'Vazirmatn', sans-serif;
    box-sizing: border-box; /* Important */
}
.modal-content form small {
    color: #777;
    text-align: center;
    margin-top: -10px;
}

/* Profile Modal Specifics */
#profile-details {
    background-color: var(--background-color);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}
#profile-details p {
    margin: 5px 0;
}
.order-summary-card {
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
}
.order-summary-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.order-summary-body p {
    margin: 5px 0;
    font-size: 0.9rem;
}

/* Invoice Modal Specifics */
#invoice-details {
    margin: 20px 0;
}
.invoice-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ccc;
}
.invoice-section:last-of-type {
    border-bottom: none;
}
.invoice-section p {
    margin: 5px 0;
}

/* Checkout Modal Layout */
.checkout-layout {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.checkout-form {
    flex: 2;
    min-width: 300px;
}
.checkout-summary {
    flex: 1;
    min-width: 250px;
    background-color: var(--background-color);
    padding: 20px;
    border-radius: var(--border-radius);
}
.checkout-summary h3, .checkout-summary h4 {
    margin-top: 0;
}
#checkout-cart-items .cart-item {
    flex-wrap: wrap;
}
#checkout-cart-items .cart-item-info {
    flex-basis: 100%;
}
#checkout-total-price {
    text-align: left;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 20px;
}
#final-payment-btn {
    width: 100%;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Simple solution for mobile, can be improved with a hamburger menu */
    }
    .hero-content h2 {
        font-size: 2.2rem;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .social-media {
        text-align: center;
    }
    .social-media a {
        margin: 0 10px;
    }
    .checkout-layout {
        flex-direction: column;
    }
}
.action {
  position: fixed;
  top: 18px;
  left: 150px; /* ✅ Make it hug the right edge */
  z-index: 1000;
}
@media (max-width: 768px) {
  .action {
    top: 18px;
    left: 90px; /* Push it closer to the left edge on mobile */
  }
}
/* Ensure the overall direction is RTL */
.action .menu {
  direction: rtl;
 position: relative;
  text-align: right;
}

/* Align list items and image icons properly */
.action .menu ul li {
  justify-content: flex-end; /* Align items to the right */
  flex-direction: row-reverse; /* Make icon appear on the left side in RTL */
}

.action .menu ul li img {
  margin-left: 10px; /* Space between icon and text */
  margin-right: 0;
}
.action .menu {
  position: absolute;
  top: 120px;
  left: 0; /* ✅ Change from `right` to `left` */
  padding: 10px 20px;
  background: #fff;
  width: 200px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  transition: 0.5s;
  visibility: hidden;
  opacity: 0;
  text-align: right; /* ✅ Ensure RTL text flows correctly */
}

.action .menu.active {
  top: 80px;
  visibility: visible;
  opacity: 1;
}

.action .menu::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 28px; /* ✅ Adjust for left-side arrow */
  width: 20px;
  height: 20px;
  background: #fff;
  transform: rotate(45deg);
}

.action .menu h3 {
  width: 100%;
  text-align: center;
  font-size: 18px;
  padding: 20px 0;
  font-weight: 500;
  color: #555;
  line-height: 1.5em;
}

.action .menu h3 span {
  font-size: 14px;
  color: #cecece;
  font-weight: 300;
}

.action .menu ul li {
  list-style: none;
  padding: 16px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
}

.action .menu ul li img {
  max-width: 20px;
  margin-right: 10px;
  opacity: 0.5;
  transition: 0.5s;
}

.action .menu ul li:hover img {
  opacity: 1;
}

.action .menu ul li a {
  display: inline-block;
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: 0.5s;
}

.action .menu ul li:hover a {
  color: #ff5d94;
}
#avatar {
    height: 35px;
}
.bee {
    position: fixed; /* Stays in place */
    left: 20px; /* Positioned at the left corner */
    bottom: 50px; /* Start near the top */
    width: 120px; /* Adjust bee size */
    z-index: 1000;
            
    animation: flyUpDown 2s ease-in-out infinite; /* Animation */
    cursor: pointer; /* Change cursor to pointer */
}

        /* Keyframes for up-down movement */
@keyframes flyUpDown {
            0% { transform: translateY(0); }
            50% { transform: translateY(20px); } /* Moves down */
            100% { transform: translateY(0); } /* Back to original */
        }

.product-container {
          transition: opacity 1s ease-in-out;
        }
#cert-modal .modal-content {
    width: 95vw;
    max-width: 1200px;
    margin: auto;
    margin-top: 60px;
    text-align: center;
    overflow: visible;
    padding: 50px;
    box-sizing: border-box;
}

/* Make the image fully responsive with zoom */
#cert-modal-img {
    transform: scale(1.1);
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    object-fit: contain;
}

/* Mobile styles: reset zoom and reduce padding */
@media (max-width: 767px) {
  /* Override modal-content inline styles */
  #cert-modal .modal-content {
    width: 90vw !important;
    max-width: 100% !important;
    margin-top: 20px !important;
    padding: 15px !important;
    text-align: center !important;  /* Just in case */
    overflow: hidden !important;
  }

  /* Override image inline styles */
  #cert-modal-img {
    transform: none !important;     /* remove any scale if added */
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
    max-height: 60vh !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;      /* center horizontally */
  }
}