/* General Styling */
body {
    font-family: 'Cairo', sans-serif;
    background-color: #f5f5f5;
    direction: rtl;
    color: #333;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.main {
    width: 90%;
    margin: 4% auto 0;
    display: flex;
    flex-direction: row;
    gap: 25px;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Company Information Section */
.section1-right {
    width: 25%;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    box-sizing: border-box;
}

.company-logo {
    width: 130px;
    height: 130px;
    border-radius: 5px;
    border: 1px solid #ebebeb;
    display: flex;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.company-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

#company-name {
    margin-top: 3%;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: right;
}

.location {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: right;
}

.fa-location-dot {
    color: red;
    font-size: 20px;
}

.location img {
    width: 20px;
    height: 15px;
}

#address {
    margin-right: 0.5%;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    min-width: 0;
}

.section1-right-line1, 
.section1-right-line2, 
.section1-right-line3, 
.section1-right-line4 {
    width: 100%;
    margin: 15px auto;
    height: 1.5px;
    background-color: #e6e8e7;
}

#conatct-btn {
    text-decoration: none;
    display: block;
    width: 100%;
}

.contact-supplier {
    width: 100%;
    height: 45px;
    margin: 5% auto;
    background-color: #668c0a;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 800;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.contact-supplier:hover {
    background-color: #556e0a;
}

.website {
    margin-top: 8%;
    margin-right: 2%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#website {
    text-decoration: none;
    font-weight: 800;
    color: #668c0a;
    word-break: break-all;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
}

#phone1, #phone2 {
    color: #668c0a;
    font-weight: 800;
    margin-right: 2%;
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    text-decoration: none;
}

#phone1 {
    margin-top: 3%;
}
#email{
    color: #668c0a;
    font-weight: 800;
        word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    text-decoration: none;

}
#categories {
    margin-right: 2%;
    font-weight: 800;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.rating-section {
    margin-top: 8%;
}

/* Content Section */
.section1-left {
    width: 75%;
    box-sizing: border-box;
}

.about-us {
    width: 100%;
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #ebebeb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 15px;
    box-sizing: border-box;
}

.about-us h1 {
    margin-top: 0;
    margin-right: 0;
    opacity: 0.8;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

#description {
    margin: 0;
    text-align: right;
    width: 100%;
    line-height: 1.6;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    padding-bottom: 15px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none; 
}

/* YouTube Video Container */
.youtube-video {
    width: 100%;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-error {
    color: #dc3545;
    text-align: center;
    padding: 1rem;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    background: #fff5f5;
    direction: rtl;
}

/* Products Section */
#products-header {
    margin-top: 2%;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin-right: 0;
}

.products-section {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
}

#products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 2%;
    padding: 0;
}

.product-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
    user-select: none;
}

.product-item h3 {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    margin: 10px 0 5px;
    color: #333;
    text-align: right;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.product-item p {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: #555;
    line-height: 1.4;
    text-align: right;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.product-item:hover {
    transform: translateY(-5px);
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 15px 0;
    flex-wrap: wrap;
    padding: 0 10px;
    width: 100%;
    box-sizing: border-box;
}

.pagination-controls button,
.pagination-controls span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    margin: 2px;
}

.pagination-controls button:hover {
    background-color: #f0f0f0;
}

.pagination-controls button:disabled {
    color: #bbb;
    cursor: not-allowed;
}

.pagination-controls .current-page {
    background-color: #a7c957;
    color: #fff;
    font-weight: bold;
    border-color: #7a9f35;
}

/* Social Media Section */
.section1-social-media {
    display: flex;
    justify-content: center;
    margin-top: 3%;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

.social-links-section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.social-links-section a {
    text-decoration: none;
    color: #333;
    font-size: 27px;
    transition: color 0.3s;
    padding: 5px;
}

.social-links-section a:hover {
    color: #668c0a;
}

/* Keywords Section */
.section1-keywords {
    width: 100%;
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #ebebeb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-top: 20px;
    box-sizing: border-box;
}

#keyword-header {
    margin-top: 0;
    margin-right: 0;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
}

#tags {
    margin-right: 0;
    line-height: 1.6;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section1-end-blank {
    width: 100%;
    height: 80px;
}




.qr-code-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.qr-code-container h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.qr-code-wrapper {
    display: inline-block;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#qrcode {
    margin: 0 auto;
}

.qr-code-container p {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}
/* Responsive Design */
@media screen and (max-width: 992px) {
    .main {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .section1-right, .section1-left {
        width: 100%;
    }
    
    #company-name, #address, .contact-supplier {
        text-align: center;
    }
    
    .location {
        justify-content: center;
        margin-right: 0;
    }
    
    #products-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .main {
        width: 100%;
        padding: 0 10px;
        margin-top: 10px;
    }
    
    #products-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .company-logo {
        width: 100px;
        height: 100px;
    }
}

@media screen and (max-width: 501px) {
    .main {
        padding: 0 5px;
        margin-top: 5px;
    }
    
    .about-us, .products-section, .section1-keywords {
        padding: 10px;
    }
    
    .about-us h1, #products-header, #keyword-header {
        font-size: 1.3rem;
        text-align: center;
        margin-right: 0;
    }
    
    #description {
        text-align: justify;
    }
    
    #products-list {
        grid-template-columns: 1fr;
    }
    
    .product-item h3, .product-item p {
        text-align: center;
    }
    
    .social-links-section {
        gap: 15px;
    }
    
    .social-links-section a {
        font-size: 22px;
    }
    
    #tags, #categories, #phone1, #phone2, .website {
        text-align: center;
        margin-right: 0;
    }
    
    .pagination-controls button,
    .pagination-controls span {
        padding: 6px 10px;
        font-size: 12px;
    }
}