/* ============================================
   OFF-CANVAS SIDEBAR - Mobile Menu
   Soldan kayarak gelen çekmece menü
   ============================================ */

/* Backdrop / Overlay */
.offcanvas-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.offcanvas-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Panel */
.offcanvas-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 80%;
    max-width: 320px;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}
.offcanvas-sidebar.is-open {
    transform: translateX(0);
}

/* ---- Header ---- */
.offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}
.offcanvas-logo img {
    height: 30px;
    width: auto;
    object-fit: contain;
}
.offcanvas-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #374151;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.offcanvas-close:hover { background: #e5e7eb; }

/* ---- Kullanıcı Kartı ---- */
.offcanvas-user-card {
    margin: 16px 16px 0;
    background: #f9fafb;
    border-radius: 14px;
    padding: 16px;
    flex-shrink: 0;
}
.offcanvas-user-logged {
    display: flex;
    align-items: center;
    gap: 12px;
}
.offcanvas-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #ff6b35), #e55a2b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
.offcanvas-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.offcanvas-user-info {
    flex: 1;
    min-width: 0;
}
.offcanvas-user-greeting {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.offcanvas-user-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.offcanvas-user-guest {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.offcanvas-btn-login {
    display: block;
    text-align: center;
    padding: 11px 16px;
    background: var(--primary-color, #ff6b35);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.offcanvas-btn-login:hover { background: var(--primary-dark, #e55a2b); }
.offcanvas-btn-register {
    display: block;
    text-align: center;
    padding: 10px 16px;
    background: transparent;
    color: var(--primary-color, #ff6b35);
    border: 1.5px solid var(--primary-color, #ff6b35);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.offcanvas-btn-register:hover {
    background: #fff3ee;
}

/* ---- Scrollable Body ---- */
.offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
    -webkit-overflow-scrolling: touch;
}
.offcanvas-body::-webkit-scrollbar { display: none; }

/* ---- Nav Sections ---- */
.offcanvas-nav-section {
    padding: 4px 0;
}
.offcanvas-nav-label {
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 20px 4px;
}
.offcanvas-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    text-decoration: none;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    position: relative;
}
.offcanvas-nav-item:hover {
    background: #f9fafb;
    color: var(--primary-color, #ff6b35);
}
.offcanvas-nav-item.active {
    color: var(--primary-color, #ff6b35);
    background: #fff3ee;
    font-weight: 600;
}
.offcanvas-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary-color, #ff6b35);
    border-radius: 0 3px 3px 0;
}
.offcanvas-nav-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #6b7280;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.offcanvas-nav-item:hover .offcanvas-nav-icon,
.offcanvas-nav-item.active .offcanvas-nav-icon {
    background: #fff3ee;
    color: var(--primary-color, #ff6b35);
}
.offcanvas-nav-text { flex: 1; }
.offcanvas-nav-arrow {
    font-size: 11px;
    color: #d1d5db;
}

/* Alt menü (sub-items) */
.offcanvas-sub-items {
    display: none;
    background: #fafafa;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}
.offcanvas-sub-items.is-open { display: block; }
.offcanvas-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px 11px 72px;
    text-decoration: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}
.offcanvas-sub-item:hover { color: var(--primary-color, #ff6b35); }
.offcanvas-sub-item i { font-size: 13px; width: 16px; text-align: center; }

/* Divider */
.offcanvas-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 8px 16px;
}

/* ---- Footer ---- */
.offcanvas-footer {
    flex-shrink: 0;
    border-top: 1px solid #f3f4f6;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    background: #fff;
}
.offcanvas-footer-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 10px;
    transition: background 0.2s;
}
.offcanvas-footer-phone:hover { background: #f3f4f6; }
.offcanvas-footer-phone i {
    width: 32px;
    height: 32px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.offcanvas-footer-phone span { flex: 1; }
.offcanvas-footer-phone small {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: #9ca3af;
}
.offcanvas-social {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.offcanvas-social-link {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.offcanvas-social-link:hover { background: #e5e7eb; color: #374151; }
.offcanvas-social-link.instagram:hover { background: #fce7f3; color: #db2777; }
.offcanvas-social-link.facebook:hover { background: #dbeafe; color: #2563eb; }
.offcanvas-social-link.twitter:hover { background: #e0f2fe; color: #0284c7; }
.offcanvas-social-link.youtube:hover { background: #fee2e2; color: #dc2626; }
.offcanvas-social-link.tiktok:hover { background: #f3f4f6; color: #111827; }
