/**
 * Amazon Associates PHP Snippets - Stylesheet
 * Includes Frontend Showcase Cards, Buttons, Responsive Grids & Admin CSS
 */

/* ==========================================================================
   1. FRONTEND PRODUCT SHOWCASE CARD
   ========================================================================== */

.aa-product-card {
	position: relative;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	margin: 20px 0;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	box-sizing: border-box;
}

.aa-product-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
	border-color: #cbd5e1;
}

/* Prime Badge */
.aa-prime-badge {
	position: absolute;
	top: 14px;
	right: 14px;
	background: #00a8e1;
	color: #ffffff;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 4px 10px;
	border-radius: 20px;
	box-shadow: 0 2px 6px rgba(0, 168, 225, 0.4);
	z-index: 2;
}

.aa-card-inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 24px;
	gap: 24px;
}

@media (max-width: 640px) {
	.aa-card-inner {
		flex-direction: column;
		text-align: center;
	}
}

.aa-card-media {
	flex: 0 0 180px;
	max-width: 180px;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.aa-card-media img {
	max-width: 100%;
	max-height: 180px;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.aa-product-card:hover .aa-card-media img {
	transform: scale(1.04);
}

.aa-no-image {
	width: 140px;
	height: 140px;
	background: #f1f5f9;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
	font-size: 12px;
	text-align: center;
}

.aa-card-content {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.aa-brand-label {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	margin-bottom: 4px;
}

.aa-product-title {
	margin: 0 0 10px 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: #0f172a;
}

.aa-product-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.aa-product-title a:hover {
	color: #c45500;
}

/* Pricing */
.aa-price-wrapper {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 14px;
}

.aa-current-price {
	font-size: 22px;
	font-weight: 800;
	color: #b12704;
}

.aa-list-price {
	font-size: 14px;
	color: #64748b;
}

/* Bullet Features */
.aa-product-features {
	list-style: none;
	padding: 0;
	margin: 0 0 18px 0;
}

.aa-product-features li {
	font-size: 13px;
	line-height: 1.5;
	color: #334155;
	margin-bottom: 4px;
	display: flex;
	align-items: flex-start;
	gap: 6px;
}

.aa-feature-icon {
	color: #16a34a;
	font-weight: bold;
}

/* Buttons */
.aa-card-actions {
	margin-top: 4px;
	margin-bottom: 10px;
}

.aa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
}

.aa-btn-amazon {
	background: linear-gradient(180deg, #FFD814 0%, #F7CA00 100%);
	border: 1px solid #F2C200;
	color: #0F1111;
	box-shadow: 0 2px 5px rgba(213, 162, 0, 0.2);
}

.aa-btn-amazon:hover {
	background: linear-gradient(180deg, #F7CA00 0%, #F0B800 100%);
	color: #000000;
	box-shadow: 0 4px 10px rgba(213, 162, 0, 0.35);
	transform: translateY(-1px);
}

.aa-amazon-icon {
	flex-shrink: 0;
}

/* Affiliate Link */
.aa-affiliate-link {
	color: #007185;
	font-weight: 600;
	text-decoration: underline;
	transition: color 0.15s ease;
}

.aa-affiliate-link:hover {
	color: #c45500;
}

.aa-ext-icon {
	font-size: 11px;
	vertical-align: super;
}

/* FTC Disclosure */
.aa-compliance-disclosure {
	font-size: 11px;
	color: #94a3b8;
	margin: 6px 0 0 0;
	line-height: 1.3;
	font-style: italic;
}

/* ==========================================================================
   2. PRODUCT GRID LAYOUT
   ========================================================================== */

.aa-product-grid {
	display: grid;
	gap: 20px;
	margin: 24px 0;
}

.aa-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.aa-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.aa-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.aa-product-grid .aa-product-card {
	margin: 0;
	height: 100%;
}

.aa-product-grid .aa-card-inner {
	flex-direction: column;
	text-align: center;
	height: 100%;
	justify-content: space-between;
}

.aa-product-grid .aa-card-media {
	flex: 0 0 auto;
	max-width: 100%;
}

@media (max-width: 768px) {
	.aa-grid-cols-2, .aa-grid-cols-3, .aa-grid-cols-4 {
		grid-template-columns: 1fr;
	}
}

/* Amazon Product Comparison Grid */
.amazon-comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    margin: 30px 0;
}

.amazon-comparison-item {
    min-width: 0;
}

@media only screen and (max-width: 767px) {
    .amazon-comparison-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   3. ADMIN PANEL STYLING
   ========================================================================== */

.aa-admin-wrap {
	max-width: 1100px;
	margin-top: 20px;
}

.aa-admin-wrap h1 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 24px;
}

.aa-admin-content {
	background: #ffffff;
	padding: 24px;
	border: 1px solid #ccd0d4;
	border-top: none;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.aa-generator-card, .aa-tester-card {
	max-width: 900px;
}

.aa-generator-input-group {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #f8fafc;
	padding: 16px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
}

.aa-code-preview-block {
	background: #1e293b;
	color: #f8fafc;
	padding: 16px;
	border-radius: 8px;
	margin-bottom: 18px;
}

.aa-code-preview-block label {
	display: block;
	font-size: 12px;
	font-weight: bold;
	color: #94a3b8;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.aa-code-copy-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #0f172a;
	padding: 10px 14px;
	border-radius: 6px;
	border: 1px solid #334155;
	margin-bottom: 8px;
}

.aa-code-copy-container code {
	color: #38bdf8;
	font-family: Consolas, Monaco, monospace;
	font-size: 13px;
	white-space: pre-wrap;
	word-break: break-all;
	background: none;
}

.aa-copy-btn {
	flex-shrink: 0;
	margin-left: 10px !important;
}

.aa-log-terminal {
	background: #0f172a;
	color: #38bdf8;
	font-family: Consolas, Monaco, monospace;
	padding: 16px;
	border-radius: 8px;
	min-height: 140px;
	max-height: 400px;
	overflow-y: auto;
	white-space: pre-wrap;
	line-height: 1.5;
	font-size: 13px;
	border: 1px solid #334155;
}
