/* General Resets */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
	font-family: 'Segoe UI', Roboto, sans-serif;
	line-height: 1.6;
	color: #333;
	max-width: 1600px;
	margin-left: auto;
	margin-right: auto;
}

/* Header Layout */
/* Ensure the header doesn't feel cramped with the new logo size */
/* Make the Top Header Sticky */
.top-header {
    position: sticky;
    top: 0;
    z-index: 1000; /* Ensures it stays above cards */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    height: 85px; /* Defining a fixed height helps the next element align */
	width: 100%;
}

/* Header Logo Scaling */
.logo-area img {
    height: 65px; /* Adjust this value to find your "practical size" */
    width: auto;  /* Maintains the 800:126 aspect ratio */
    display: block;
}

.contact-info {
    text-align: right;
    font-size: 1.1em;
}

.contact-info a {
	text-decoration: none;
	color: #000;
}

/* Action Button */
.message-us-btn {
    align-self: flex-start;
    margin-top: 3px;
    padding: 3px 16px 0 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 16px;
	font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
    cursor: pointer;
}

.message-us-btn:hover {
    background: #0056b3;
}

/* Hero Section */
.hero-section {
    width: 100%;
    height: 400px;
    background: url('/images/hero-bg.jpg') no-repeat center center/cover;
}

.hero-opacity {
    background: rgba(0, 0, 0, 0.5); /* Makes text readable over image */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    width: 100%;
	height: 100%;
}

.hero-content {
    width: 100%;
}

.hero-content p {
	font-size: 24px;
	margin: 0 24px;
}

/* Category Nav */
/* Make the Category Nav Sticky */
.category-nav {
	display: flex;
	justify-content: center;
    position: sticky;
    top: 85px; /* This must match the height of the .top-header */
    z-index: 999;
    background: #f4f4f4;
}

.category-left, .category-right {
	padding: 12px 5px;
	font-size: 20px;
	font-weight: bold;
}

.category-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 15px;
    border-bottom: 2px solid #ddd;
    margin: 0;
}

.category-nav li {
    margin: 0 15px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
	white-space: nowrap;
}

.category-nav li.active {
    color: #007bff; /* Highlight color */
    border-bottom: 2px solid #007bff;
}

/* Container for the cards */
.item-container {
    padding: 30px 10%;
    display: flex;
    flex-direction: column;
    gap: 25px; /* Spacing between cards */
    background-color: #fff;
}

/* Individual Item Card */
.item-card {
    display: flex;
    height: 280px; /* Fixed height */
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Left Side: Product Image */
.card-image {
    flex: 0 0 320px; /* Fixed width for image side */
    background-color: #fcfcfc;
    border-right: 1px solid #eee;
    display: flex;
	flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.card-image h2 {
	display: none;
	font-size: 16px;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Vital for radio gear of different shapes */
}

/* Right Side: Details */
.card-details {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    position: relative; /* Essential for the fade overlay */
}

.card-details h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-weight: 700;
}

.card-text-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Description area with the fade */
.description-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* The Fade Effect */
.text-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px; /* Adjust based on how much fade you want */
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
}

/* Out of Stock Label */
.out-of-stock-label {
    align-self: flex-start;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: 0.04em;
}

/* Action Button */
.view-item-btn {
    align-self: flex-start;
    margin-top: 15px;
    padding: 10px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.view-item-btn:hover {
    background: #0056b3;
}

/* Modal Overlay */
.modal-overlay {
    display: none; /* Hidden by default */
	justify-content: center;
	align-items: center;
    position: fixed;
    z-index: 2000; /* Higher than sticky header */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Opaque black background */
    overflow-y: auto;
}

/* The Modal Card */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 80%;
    max-width: 1000px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 35px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}

@media (max-width: 1600px) {
    .category-nav ul {
        justify-content: flex-start; /* Align left for scrolling */
        overflow-x: auto;            /* Allow horizontal scroll */
        white-space: nowrap;         /* Keep line single */
        flex-wrap: nowrap;           /* Disable wrapping */
        -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
        padding-bottom: 20px;        /* Room for a scrollbar if it appears */
    }
}

@media screen and (max-width: 1200px) {
	.hero-section {
		height: 300px;
	}

	.card-details h2 {
		font-size: 20px;
	}
}

/* Mobile styles */
@media screen and (max-width: 900px) {
	.top-header {
		padding: 0 5%;
	}
	
	.logo-area img {
		height: 55px;
	}

	.hero-section {
		height: 250px;
	}
	
	.card-details h2 {
		font-size: 16px;
	}
}

/* Mobile styles */
@media screen and (max-width: 800px) {
	.logo-area img {
		height: 45px;
	}

	.hero-section {
		height: 200px;
	}

	.hero-content h1 {
		font-size: 24px;
	}

	.hero-content p {
		font-size: 18px;
	}

	/* Individual Item Card */
	.item-card {
		flex-direction: column;
		align-items: center;
		height: auto;
	}

	.card-image {
		max-height: 200px;
		padding: 25px;
	}

	.card-image h2 {
		display: flex;
		text-align: center;
	}
	
	.card-details {
		display: none;
	}

	.card-details h2 {
		text-align: center;
	}
	
	.description-container {
		display: none;
	}

	.view-item-btn {
		margin: 0 0 15px 0;
	}

}

/* Mobile styles */
@media screen and (max-width: 600px) {
	.logo-area img {
		height: 45px;
	}

	.top-header {
		flex-direction: column;
		justify-content: center;
		align-items: center;
		padding: 10px 5%;
		height: 120px; /* Defining a fixed height helps the next element align */
		width: 100%;
	}

	.category-nav {
		top: 120px; /* This must match the height of the .top-header */
		z-index: 999;
		background: #f4f4f4;
	}
	
	.contact-info {
		padding-top: 0px;
		margin-top: 0px;
		font-size: 16px;
		text-align: center;
	}

	.contact-info span {
		display: none;
	}

	.hero-section {
		height: 150px;
	}

	.hero-content {
		padding: 20px;
	}

	.hero-content h1 {
		font-size: 20px;
	}

	.hero-content p {
		font-size: 16px;
	}

}

@media screen and (max-width: 520px) {
	.hero-content h1 {
		font-size: 16px;
	}

	.hero-content p {
		font-size: 14px;
	}
}
/* ── Message Modal ─────────────────────────────────────────── */
.msg-dialog-box {
	position: relative;
	background: #fff;
	border-radius: 10px;
	width: 90%;
	max-width: 520px;
	padding: 30px 30px 24px;
	box-shadow: 0 6px 30px rgba(0,0,0,0.25);
}

.msg-close-button {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 34px;
	height: 34px;
	background: #ff4d4d;
	color: #fff;
	font-size: 22px;
	font-weight: bold;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, transform 0.15s;
}

.msg-close-button:hover  { background: #cc0000; transform: scale(1.1); }
.msg-close-button:active { transform: scale(0.95); }

.msg-title {
	font-size: 1.4em;
	font-weight: 700;
	margin: 0 0 18px;
	color: #1a1a1a;
}

.msg-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 14px;
}

.msg-field label {
	font-size: 0.88em;
	font-weight: 600;
	color: #444;
}

.msg-required {
	color: #c0392b;
}

.msg-field input,
.msg-field textarea {
	padding: 8px 10px;
	font-size: 0.97em;
	border: 1px solid #ccc;
	border-radius: 5px;
	font-family: inherit;
	transition: border-color 0.2s;
	resize: vertical;
}

.msg-field input:focus,
.msg-field textarea:focus {
	outline: none;
	border-color: #007bff;
}

.msg-error {
	color: #c0392b;
	font-size: 0.88em;
	font-weight: 600;
	margin-bottom: 10px;
}

.msg-success {
	color: #1a7a3c;
	font-size: 1em;
	font-weight: 600;
	padding: 20px 0 10px;
}

.msg-success-reload {
	font-size: 0.88em;
	font-weight: 400;
	color: #444;
	margin-top: 14px;
}

.msg-reload-btn {
	margin-top: 8px;
	padding: 8px 18px;
	background: #e0e0e0;
	color: #333;
	border: none;
	border-radius: 6px;
	font-size: 0.95em;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.msg-reload-btn:hover { background: #c8c8c8; }

.msg-spam-notice {
	margin-top: 10px;
	font-size: 0.85em;
	font-weight: 400;
	color: #666;
	font-style: italic;
}

.msg-buttons {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 6px;
}

.msg-submit-btn {
	padding: 9px 22px;
	background: #007bff;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 0.97em;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.msg-submit-btn:hover    { background: #0056b3; }
.msg-submit-btn:disabled { background: #80bdff; cursor: not-allowed; }

.msg-cancel-btn {
	padding: 9px 22px;
	background: #e0e0e0;
	color: #333;
	border: none;
	border-radius: 6px;
	font-size: 0.97em;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.msg-cancel-btn:hover { background: #c8c8c8; }

@media screen and (max-width: 600px) {
	.msg-dialog-box {
		padding: 20px 16px 18px;
	}
}