/* Responsive: Ensure buttons fit on very small screens (e.g. Galaxy Fold 5, 226px min width) */
@media (max-width: 260px) {
    .pts-btn,
    .pts-btn-primary,
    .pts-btn-dark {
        padding-left: 4px;
        padding-right: 4px;
        font-size: 12px;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }
    .pts-order-actions,
    .pts-purchase-actions,
    .pts-repair-actions {
        flex-direction: column !important;
        gap: 4px !important;
        width: 100%;
        align-items: stretch !important;
    }
    .pts-order-actions .pts-btn,
    .pts-purchase-actions .pts-btn,
    .pts-repair-actions .pts-btn {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}
/* Hide page titles globally for PowerTechTheme */
.pts-hide-title {
    display: none !important;
}
/*
Theme Name: PowerTechTheme
Theme URI: https://powertechcenter.ph
Author: Powertech
Description: Minimalistic, iOS-inspired theme for Powertech System.
Version: 1.0.0
Text Domain: powertech-ios
*/

:root {
    --pts-primary: #0079b1ff;
    --pts-primary-dark: #00588fff;
    --pts-bg: #f5f5f7;
    --pts-card-bg: #ffffff;
    --pts-text: #1d1d1f;
    --pts-text-secondary: #86868b;
    --pts-border: #d2d2d7;
    --pts-radius-lg: 20px;
    --pts-radius-md: 12px;
    --pts-font-main: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--pts-bg);
    color: var(--pts-text);
    font-family: var(--pts-font-main);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

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

.pts-card {
    background: var(--pts-card-bg);
    border-radius: var(--pts-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.pts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--pts-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.pts-btn-primary {
    background: var(--pts-primary);
    color: #fff;
}

.pts-btn-dark {
    background: #1d1d1f;
    color: #fff;
}

/* Bottom Navigation */
.pts-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--pts-border);
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    z-index: 2000;
}

.pts-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.pts-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--pts-text-secondary);
    transition: color 0.2s;
}

.pts-nav-item.active {
    color: var(--pts-text);
}

.pts-nav-icon {
    margin-bottom: 4px;
}

.pts-nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* Profile specific */
.pts-profile-wrapper {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
}

@media (max-width: 360px) {
    .pts-profile-wrapper {
        padding: 0 8px;
    }
}

/* Ensure text fits in cards */
.pts-card {
    overflow-wrap: break-word;
    word-wrap: break-word;
    /* Legacy support */
    word-break: break-word;
}

.pts-card>div {
    min-width: 0;
    /* Allow flex children to shrink */
}

@media (max-width: 360px) {
    .pts-card {
        padding: 16px;
        /* Slightly reduce padding on very small screens */
    }

    .pts-card div {
        font-size: 14px;
        /* Ensure body text isn't massive */
    }
}



.pts-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    z-index: 1000;
    border-bottom: 1px solid var(--pts-border);
    padding: 0;
    height: 70px;
}

.pts-header .pts-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100%;
}

.pts-search-container {
    flex: 1;
    max-width: 400px;
}

.pts-search-form {
    width: 100%;
}

.pts-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pts-search-icon {
    position: absolute;
    left: 12px;
    color: var(--pts-text-secondary);
    pointer-events: none;
}

.pts-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border-radius: 10px;
    border: none;
    background: #f2f2f7;
    font-size: 14px;
    font-family: var(--pts-font-main);
    transition: all 0.2s;
}

.pts-search-input:focus {
    outline: none;
    background: #e5e5ea;
}

.pts-search-input::placeholder {
    color: var(--pts-text-secondary);
}



/* Side Navigation */
.pts-side-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    visibility: hidden;
    transition: visibility 0.3s;
}

.pts-side-nav.open {
    visibility: visible;
}

.pts-side-nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
}

.pts-side-nav.open .pts-side-nav-overlay {
    opacity: 1;
}

.pts-side-nav-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #fff;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top);
}

.pts-side-nav.open .pts-side-nav-content {
    transform: translateX(0);
}

.pts-menu-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 24px;
    padding: 16px;
    cursor: pointer;
    color: var(--pts-text-secondary);
}

/* Mobile Menu List */
.pts-mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pts-mobile-menu ul li {
    border-bottom: 1px solid var(--pts-border);
}

.pts-mobile-menu ul li a {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--pts-text);
    font-weight: 500;
    font-size: 16px;
}

.pts-mobile-menu ul li a:active {
    background: #f5f5f7;
}

/* Hide original primary nav if present */
.pts-header nav.main-nav {
    display: none;
}

/* QR Scan Button */
.pts-scan-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 8px;
    color: var(--pts-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.pts-scan-btn:active {
    opacity: 0.6;
}

/* QR Modal */
.pts-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.pts-qr-modal.open {
    display: flex;
}

.pts-qr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.pts-qr-content {
    position: relative;
    z-index: 3001;
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    overflow: hidden;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.pts-qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pts-qr-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pts-qr-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--pts-text-secondary);
    padding: 0;
    line-height: 1;
}

#pts-reader {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.pts-qr-instruction {
    text-align: center;
    color: var(--pts-text-secondary);
    font-size: 14px;
    margin-top: 15px;
    margin-bottom: 0;
}

/* My Account Purchases Styles */
.pt-purchase-card {
    background: var(--pts-card-bg);
    border-radius: var(--pts-radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pt-purchase-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pt-purchase-header {
    display: flex;
    padding: 24px;
    gap: 20px;
    align-items: flex-start;
}

.pt-purchase-image {
    width: 64px;
    height: 64px;
    background: #f5f5f7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pt-purchase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.pt-purchase-image svg {
    width: 32px;
    height: 32px;
    color: var(--pts-text-secondary);
}

.pt-purchase-info {
    flex: 1;
    min-width: 0;
    /* Allow text truncate */
}

.pt-purchase-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--pts-text);
}

.pt-purchase-meta {
    font-size: 13px;
    color: var(--pts-text-secondary);
    margin: 0 0 12px;
}

.pt-purchase-details {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.pt-purchase-date {
    font-size: 14px;
    color: var(--pts-text-secondary);
}

/* Status Badges */
.pt-purchase-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.pt-purchase-status.delivered {
    background: #dcfce7;
    color: #166534;
    /* Green */
}

.pt-purchase-status.transit {
    background: #e0f2fe;
    color: #0369a1;
    /* Blue */
}

.pt-purchase-status.on-hold {
    background: #fef9c3;
    color: #854d0e;
    /* Yellow/Brown */
}

.pt-purchase-tracking {
    font-size: 13px;
    color: var(--pts-text-secondary);
    margin-top: 8px;
}

.pt-tracking-number {
    font-weight: 600;
    color: var(--pts-text);
    margin-left: 4px;
}

.pt-purchase-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--pts-text);
    white-space: nowrap;
}

/* Actions Section */
.pt-purchase-actions {
    padding: 16px 24px;
    background: #fafafa;
    /* Slightly distinct background for footer */
    border-top: 1px solid var(--pts-border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pt-purchase-actions .pt-btn {
    width: 100%;
    margin: 0;
    /* Override any defaults */
}

/* Button Variants overrides for this context */
.pt-btn-primary {
    background: #1d1d1f;
    /* Dark button as per design */
    color: #fff;
    border: none;
}

.pt-btn-primary:hover {
    background: #000;
}

.pt-btn-secondary {
    background: #ffffff;
    border: 1px solid var(--pts-border);
    color: var(--pts-text);
}

.pt-btn-secondary:hover {
    background: #f5f5f7;
}

/* Stats Cards (Dashboard) */
.pt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.pt-stat-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.pt-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pt-stat-content p {
    margin: 0;
}

.pt-stat-label {
    font-size: 13px;
    color: #86868b;
    margin-bottom: 2px;
}

.pt-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
}

.pt-stat-change {
    font-size: 12px;
    color: #10b981;
    margin-top: 2px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .pt-purchase-header {
        flex-direction: column;
    }

    .pt-purchase-price {
        align-self: flex-start;
        font-size: 24px;
    }

    .pt-purchase-actions {
        grid-template-columns: 1fr;
    }
}

/* Button Base Styles for My Account (Plugin overrides) */
.pt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--pts-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    font-size: 14px;
    font-family: var(--pts-font-main);
}

.pt-btn:active {
    transform: scale(0.98);
}

/* Primary Button (Dark) */
.pt-btn-primary {
    background: #1d1d1f;
    color: #fff;
}

.pt-btn-primary:hover {
    background: #000;
}

/* Secondary Button (Outlined) */
.pt-btn-secondary {
    background: #ffffff;
    border: 1px solid var(--pts-border);
    color: var(--pts-text);
}

.pt-btn-secondary:hover {
    background: #f5f5f7;
}