/* 
 * الورقة الخضراء للتغليف
 * Main Stylesheet
 */

/* ===== Variables ===== */
:root {
    --green-primary: #198754;
    --green-dark: #146c43;
    --green-light: #d1e7dd;
    --font-arabic: 'Tajawal', sans-serif;
}

/* ===== Base Styles ===== */
body {
    font-family: var(--font-arabic);
    direction: rtl;
    text-align: right;
}

a {
    transition: all 0.3s ease;
}

/* ===== Header ===== */
.top-bar {
    font-size: 0.875rem;
}

.header-main {
    z-index: 1000;
}

.navbar-brand img {
    max-height: 60px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--green-primary) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 60vh;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23198754' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-image {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.min-vh-50 {
    min-height: 50vh;
}

/* ===== Category Cards ===== */
.category-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.category-icon i {
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon i {
    transform: scale(1.2);
}

/* ===== Product Cards ===== */
.product-card {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-image-wrapper {
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* ===== Product Detail ===== */
.product-gallery .main-image img {
    max-height: 400px;
    width: 100%;
    object-fit: contain;
}

.thumbnail-image {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    height: 60px;
    object-fit: cover;
}

.thumbnail-image:hover,
.thumbnail-image.active {
    opacity: 1;
    border: 2px solid var(--green-primary);
}

/* ===== Cart ===== */
.cart-item {
    transition: background 0.3s ease;
}

.cart-item:hover {
    background: #f8f9fa;
}

.cart-badge {
    font-size: 0.65rem;
}

/* ===== Buttons ===== */
.btn-success {
    background-color: var(--green-primary);
    border-color: var(--green-primary);
}

.btn-success:hover {
    background-color: var(--green-dark);
    border-color: var(--green-dark);
}

.btn-outline-success {
    color: var(--green-primary);
    border-color: var(--green-primary);
}

.btn-outline-success:hover {
    background-color: var(--green-primary);
    border-color: var(--green-primary);
}

/* ===== Hover Effects ===== */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
    padding-right: 5px;
}

/* ===== WhatsApp Float Button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background: #128C7E;
    color: white;
    transform: scale(1.1);
}

/* ===== Forms ===== */
.form-control:focus,
.form-select:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* ===== Info Cards ===== */
.info-card {
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-3px);
}

/* ===== Order Timeline ===== */
.order-timeline {
    padding: 20px 0;
}

.order-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e9ecef;
    z-index: 0;
}

.timeline-step {
    position: relative;
    z-index: 1;
}

.step-icon {
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ===== Alerts ===== */
.alert {
    border: none;
    border-radius: 10px;
}

/* ===== Breadcrumb ===== */
.breadcrumb-item a {
    color: var(--green-primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-dark) 100%);
}

/* ===== Pagination ===== */
.pagination .page-link {
    color: var(--green-primary);
    border: none;
    margin: 0 3px;
    border-radius: 5px;
}

.pagination .page-item.active .page-link {
    background-color: var(--green-primary);
    color: white;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
    }
    
    .product-image-wrapper {
        height: 180px;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ===== Success Page ===== */
.success-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ===== Loading ===== */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--green-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--green-dark);
}

/* ===== Badge ===== */
.badge {
    font-weight: 500;
}

/* ===== Card ===== */
.card {
    border-radius: 15px;
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
}

/* ===== Table ===== */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    border-top: none;
}

/* ===== Print Styles ===== */
@media print {
    .whatsapp-float,
    .top-bar,
    .header-main,
    .footer {
        display: none !important;
    }
}
