/* ============================================================
   Andrew J Millar — Inner Pages Shared Styles
   ============================================================ */

/* Page wrapper */
.ajm-page {
    min-height: 100vh;
    padding: 150px 40px 80px;
    position: relative;
    z-index: 10;
}

.ajm-page-inner {
    max-width: 860px;
    margin: 0 auto;
}

.ajm-page-inner--wide {
    max-width: 1100px;
    margin: 0 auto;
}

/* Page heading */
.ajm-page-title {
    font-family: 'EB Garamond', serif;
    font-size: 36px;
    font-weight: 400;
    color: #e8d5a3;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.ajm-page-subtitle {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 48px;
    display: block;
}

/* Divider */
.ajm-divider {
    border: none;
    border-top: 1px solid rgba(201,168,76,0.2);
    margin: 40px 0;
}

/* Notices */
.ajm-notice {
    padding: 14px 20px;
    margin-bottom: 24px;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 13px;
    letter-spacing: 0.06em;
    line-height: 1.6;
}
.ajm-notice--error   { border: 1px solid rgba(200,80,80,0.6);  color: #e8a0a0; background: rgba(139,68,68,0.12); }
.ajm-notice--success { border: 1px solid rgba(80,160,100,0.6); color: #a0c8a8; background: rgba(74,124,90,0.12); }
.ajm-notice--info    { border: 1px solid rgba(201,168,76,0.4); color: #e8d5a3; background: rgba(201,168,76,0.06); }

/* Cards / panels */
.ajm-card {
    border: 1px solid rgba(201,168,76,0.2);
    background: rgba(10,8,5,0.6);
    padding: 36px;
    margin-bottom: 24px;
}

.ajm-card-title {
    font-family: 'EB Garamond', serif;
    font-size: 22px;
    color: #e8d5a3;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(201,168,76,0.15);
}

/* Two column layout */
.ajm-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Form elements */
.ajm-form-row {
    margin-bottom: 24px;
}

.ajm-label {
    display: block;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(232,213,163,0.6);
    margin-bottom: 8px;
}

.ajm-label.required::after {
    content: ' *';
    color: #c9a84c;
}

.ajm-input,
.ajm-select,
.ajm-textarea {
    width: 100%;
    background: rgba(201,168,76,0.05);
    border: 1px solid rgba(201,168,76,0.25);
    color: #e8d5a3;
    padding: 12px 16px;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 14px;
    letter-spacing: 0.04em;
    outline: none;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.ajm-input:focus,
.ajm-select:focus,
.ajm-textarea:focus {
    border-color: #c9a84c;
    background: rgba(201,168,76,0.08);
}

.ajm-input::placeholder,
.ajm-textarea::placeholder {
    color: rgba(232,213,163,0.25);
}

.ajm-input.is-invalid,
.ajm-select.is-invalid,
.ajm-textarea.is-invalid {
    border-color: rgba(200,80,80,0.6);
}

.ajm-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a84c' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.ajm-select option {
    background: #1a1610;
    color: #e8d5a3;
}

.ajm-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.ajm-field-error {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 11px;
    color: #e87a7a;
    letter-spacing: 0.06em;
    margin-top: 6px;
    display: none;
}
.ajm-field-error.d-block,
.ajm-field-error:not(:empty) { display: block; }

/* Toggle / checkbox */
.ajm-check {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
.ajm-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(201,168,76,0.4);
    background: rgba(201,168,76,0.05);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
.ajm-check input[type="checkbox"]:checked {
    background: #c9a84c;
    border-color: #c9a84c;
}
.ajm-check input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 2px;
    font-size: 13px;
    color: #0a0805;
    font-weight: bold;
}
.ajm-check-label {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 13px;
    color: rgba(232,213,163,0.7);
    letter-spacing: 0.04em;
}

/* Quantity input group */
.ajm-qty-group {
    display: flex;
    gap: 0;
    max-width: 200px;
}
.ajm-qty-group .ajm-input {
    text-align: center;
    width: 70px;
    flex-shrink: 0;
}

/* Buttons */
.ajm-btn,
.ajm-btn-secondary {
    display: inline-block;
    padding: 13px 32px;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    line-height: 1;
    white-space: nowrap;
}

.ajm-btn {
    background: linear-gradient(135deg, #c9a84c, #a8863c);
    color: #0a0805 !important;
}
.ajm-btn:hover { opacity: 0.85; }

.ajm-btn-secondary {
    background: transparent;
    border: 1px solid rgba(201,168,76,0.5);
    color: #c9a84c !important;
}
.ajm-btn-secondary:hover {
    border-color: #c9a84c;
    background: rgba(201,168,76,0.08);
}

.ajm-btn-ghost {
    display: inline-block;
    padding: 13px 0;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(232,213,163,0.5) !important;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s;
}
.ajm-btn-ghost:hover { color: #c9a84c !important; }

/* Form actions row */
.ajm-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid rgba(201,168,76,0.15);
    flex-wrap: wrap;
    gap: 16px;
}

/* Tables */
.ajm-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 13px;
}
.ajm-table th {
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 11px;
    color: rgba(232,213,163,0.45);
    border-bottom: 1px solid rgba(201,168,76,0.2);
    padding: 12px 16px;
    text-align: left;
}
.ajm-table td {
    color: rgba(232,213,163,0.8);
    border-bottom: 1px solid rgba(201,168,76,0.08);
    padding: 16px;
    vertical-align: middle;
}
.ajm-table tr:last-child td { border-bottom: none; }
.ajm-table a { color: #c9a84c; text-decoration: none; }
.ajm-table a:hover { opacity: 0.8; }

/* Account menu links */
.ajm-menu-links {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}
.ajm-menu-links li {
    border-bottom: 1px solid rgba(201,168,76,0.08);
}
.ajm-menu-links a {
    display: block;
    padding: 14px 0;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: rgba(232,213,163,0.7);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
}
.ajm-menu-links a:hover {
    color: #c9a84c;
    padding-left: 8px;
}

/* Section heading (within a page) */
.ajm-section-title {
    font-family: 'EB Garamond', serif;
    font-size: 20px;
    color: #e8d5a3;
    letter-spacing: 0.06em;
    font-weight: 400;
    margin: 40px 0 20px;
}
.ajm-section-title:first-child { margin-top: 0; }

/* Product image gallery */
.ajm-product-images img {
    border: 1px solid rgba(201,168,76,0.15);
    cursor: pointer;
    transition: border-color 0.2s;
    max-width: 100%;
}
.ajm-product-images img:hover { border-color: #c9a84c; }
.ajm-product-thumb-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.ajm-product-thumb-row img {
    width: 70px;
    height: 70px;
    object-fit: cover;
}

/* Price display */
.ajm-price {
    font-family: 'EB Garamond', serif;
    font-size: 32px;
    color: #c9a84c;
    letter-spacing: 0.04em;
    margin: 16px 0;
}
.ajm-price-old {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 14px;
    color: rgba(232,213,163,0.35);
    text-decoration: line-through;
    margin-bottom: 4px;
}

/* Product meta info */
.ajm-product-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.ajm-product-meta li {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: rgba(232,213,163,0.45);
    padding: 4px 0;
}

/* Tabs */
.ajm-tabs {
    display: flex;
    border-bottom: 1px solid rgba(201,168,76,0.2);
    margin-bottom: 32px;
    gap: 0;
}
.ajm-tab {
    padding: 12px 24px;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(232,213,163,0.45);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: -1px;
}
.ajm-tab:hover,
.ajm-tab.active {
    color: #c9a84c;
    border-bottom-color: #c9a84c;
}
.ajm-tab-pane { display: none; }
.ajm-tab-pane.active { display: block; }

/* Description content area */
.ajm-description {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(232,213,163,0.7);
    letter-spacing: 0.03em;
}
.ajm-description p { margin-bottom: 16px; }

/* Status badge */
.ajm-badge {
    display: inline-block;
    padding: 3px 10px;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.ajm-badge--success { border: 1px solid rgba(80,160,100,0.5); color: #a0c8a8; }
.ajm-badge--warning { border: 1px solid rgba(201,168,76,0.5); color: #c9a84c; }
.ajm-badge--danger  { border: 1px solid rgba(200,80,80,0.5);  color: #e8a0a0; }

/* Responsive */
@media (max-width: 768px) {
    .ajm-page { padding: 120px 20px 60px; }
    .ajm-cols { grid-template-columns: 1fr; }
    .ajm-card { padding: 24px 20px; }
    .ajm-page-title { font-size: 28px; }
    .ajm-form-actions { flex-direction: column; align-items: stretch; }
    .ajm-btn, .ajm-btn-secondary { text-align: center; width: 100%; }
}
