/* Gulf Pharmacy side drawers (sidebar + minicart). Tokens: common.css :root */

.gp-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: #fff;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0,0,0,0.1);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
    visibility: visible;
}

.gp-drawer[aria-hidden="true"] {
    visibility: hidden;
}

.gp-drawer[data-side="left"] {
    left: 0;
    transform: translateX(0);
}
.gp-drawer[data-side="left"][aria-hidden="true"] {
    transform: translateX(-100%);
}

.gp-drawer[data-side="right"] {
    right: 0;
    transform: translateX(0);
}
.gp-drawer[data-side="right"][aria-hidden="true"] {
    transform: translateX(100%);
}

/* Backdrop */
.gp-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1999;
    opacity: 1;
    transition: opacity 0.3s;
}
.gp-drawer-backdrop[hidden] {
    display: block !important; /* overrides [hidden] but we use opacity/pointer-events */
    opacity: 0;
    pointer-events: none;
}

.gp-drawer-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gp-drawer-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--gp-text);
}
.gp-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: var(--gp-muted);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.gp-drawer-close:hover {
    background: #e2e8f0;
    color: var(--gp-text);
}

.gp-drawer-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.gp-drawer-foot {
    padding: 20px 24px;
    border-top: 1px solid var(--gp-border);
    background: #f8fafc;
}

/* Sidebar Specifics */
.gp-sidebar-greet {
    padding: 32px 24px;
    background: #214548;
    color: #fff;
}
.gp-sidebar-greet-name {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}
.gp-sidebar-greet-sub {
    margin: 4px 0 0;
    font-size: 14px;
    opacity: 0.8;
}
.gp-sidebar-greet-sub a {
    color: #fff;
    text-decoration: underline;
}

.gp-sidebar-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--gp-border);
}
.gp-sidebar-section:last-child {
    border-bottom: none;
}
.gp-sidebar-section-title {
    padding: 8px 24px;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gp-muted);
}
.gp-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    text-decoration: none;
    color: var(--gp-text);
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.gp-sidebar-link:hover {
    background: #f0fdfa;
    color: var(--gp-primary);
}
.gp-sidebar-link svg {
    color: var(--gp-muted);
}
.gp-sidebar-link:hover svg {
    color: var(--gp-primary);
}
.gp-sidebar-signout {
    color: #dc2626;
}
.gp-sidebar-signout:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* Minicart Specifics */
.gp-minicart-body {
    padding: 16px 24px;
}
.gp-cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gp-border);
}
.gp-cart-item:last-child {
    border-bottom: none;
}
.gp-cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
}
.gp-cart-item-info {
    flex: 1;
}
.gp-cart-item-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gp-text);
    text-decoration: none;
    margin-bottom: 4px;
}
.gp-cart-item-meta {
    font-size: 13px;
    color: var(--gp-muted);
}
.gp-cart-item-price {
    margin-top: 4px;
    font-weight: 700;
    color: var(--gp-primary);
}
.gp-cart-item-remove {
    border: none;
    background: transparent;
    color: var(--gp-muted);
    cursor: pointer;
    padding: 4px;
}
.gp-cart-item-remove:hover {
    color: #dc2626;
}

.gp-cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}
.gp-cart-summary-row.total {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 800;
    color: var(--gp-text);
}
.gp-cart-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.2s;
}
.gp-btn:hover {
    filter: brightness(0.95);
}
.gp-btn--primary {
    background: var(--gp-primary);
    color: #fff;
}
.gp-btn--outline {
    background: transparent;
    border: 1px solid var(--gp-border);
    color: var(--gp-text);
}
